diff --git a/data/pluscampaign-v1.sql b/data/pluscampaign-v1.sql index 770f785..24a279d 100644 --- a/data/pluscampaign-v1.sql +++ b/data/pluscampaign-v1.sql @@ -7,7 +7,7 @@ DO $$ $$ LANGUAGE plpgsql; -- Plugin version history -INSERT INTO version_history (component, from_version, to_version, author) VALUES ('PLUSCAMPAIGN', 0, 1, 'Initial Creation'); +INSERT INTO version_history (component, from_version, to_version, author) VALUES ('REWARDCAMPAIGN', 0, 1, 'Initial Creation'); CREATE TABLE campaigns( @@ -15,6 +15,8 @@ CREATE TABLE campaigns( communityid INTEGER NOT NULL REFERENCES communities(communityid) ON DELETE CASCADE ON UPDATE CASCADE, target_rewards INTEGER, campaign_name TEXT NOT NULL, + moderator_role_id BIGINT, + logging_webhook_url TEXT, started_at TIMESTAMPTZ, completed_at TIMESTAMPTZ, created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), @@ -33,6 +35,8 @@ CREATE TABLE campaign_rewards_earned( fulfilled_at TIMESTAMPTZ, fulfilled_note TEXT, modnote TEXT, + reference TEXT, + logged_messageid BIGINT, earned_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), earned_reason TEXT NOT NULL, _timestamp TIMESTAMPTZ NOT NULL DEFAULT NOW() diff --git a/plugin/data.py b/plugin/data.py index 62462e5..e97953f 100644 --- a/plugin/data.py +++ b/plugin/data.py @@ -13,6 +13,9 @@ class Campaign(RowModel): started_at = Timestamp() completed_at = Timestamp() + moderator_role_id = Integer() + logging_webhook_url = String() + created_at = Timestamp() _timestamp = Timestamp() @@ -34,13 +37,16 @@ class EarnedReward(RowModel): earned_at = Timestamp() earned_from = String() modnote = String() + reference = String() + + log_messageid = Integer() _timestamp = Timestamp() class CampaignData(Registry): - VERSION = ("CAMPAIGN", 1) + VERSION = ("REWARDCAMPAIGN", 1) Campaign = Campaign campaigns = Campaign.table