Files
apskel-pos-backend/migrations/000092_rename_campaign_tokens_to_coins.up.sql
T

8 lines
479 B
SQL
Raw Normal View History

-- Tokens become EnakCoin (docs/prd-point-coin.md §10). Campaigns that handed out
-- tokens now hand out coins; the API still accepts TOKENS and stores it as COINS.
UPDATE campaigns SET type = 'COINS' WHERE type = 'TOKENS';
UPDATE campaign_rules SET reward_type = 'COINS' WHERE reward_type = 'TOKENS';
COMMENT ON COLUMN campaigns.type IS 'Type of campaign: REWARD, POINTS, COINS, MIXED';
COMMENT ON COLUMN campaign_rules.reward_type IS 'Type of reward: POINTS, COINS, REWARD';