Skip to content

Commit b8dd680

Browse files
committed
migrations - add channel.targeting_rules field
1 parent 6e07526 commit b8dd680

File tree

3 files changed

+11
-8
lines changed
  • sentry/migrations

3 files changed

+11
-8
lines changed
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
INSERT INTO
2-
channels
3-
VALUES
1+
INSERT INTO
2+
channels (id, creator, deposit_asset, deposit_amount, valid_until, targeting_rules, spec)
3+
VALUES
44
(
5-
'0x061d5e2a67d0a9a10f1c732bca12a676d83f79663a396f7d87b3e30b9b411088',
6-
'0x033ed90e0fec3f3ea1c9b005c724d704501e0196',
7-
'0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359',
5+
'0x061d5e2a67d0a9a10f1c732bca12a676d83f79663a396f7d87b3e30b9b411088',
6+
'0x033ed90e0fec3f3ea1c9b005c724d704501e0196',
7+
'0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359',
88
'1000',
99
to_timestamp(4102444800),
10-
'{"minPerImpression":"1","maxPerImpression":"10","pricingBounds":{"CLICK":{"min":"0","max":"0"}},"withdrawPeriodStart":4073414400000,"validators":[{"id":"0xce07CbB7e054514D590a0262C93070D838bFBA2e","url":"http://localhost:8005","fee":"100"},{"id":"0xC91763D7F14ac5c5dDfBCD012e0D2A61ab9bDED3","url":"http://localhost:8006","fee":"100"}]}'
11-
);
10+
'[]',
11+
'{"targeting_rules": [], "minPerImpression":"1","maxPerImpression":"10","created":1564383600000,"pricingBounds":{"CLICK":{"min":"0","max":"0"}},"withdrawPeriodStart":4073414400000,"validators":[{"id":"0xce07CbB7e054514D590a0262C93070D838bFBA2e","url":"http://localhost:8005","fee":"100"},{"id":"0xC91763D7F14ac5c5dDfBCD012e0D2A61ab9bDED3","url":"http://localhost:8006","fee":"100"}]}'
12+
);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE channels DROP COLUMN targeting_rules;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE channels ADD COLUMN targeting_rules JSONB NOT NULL DEFAULT '[]';

0 commit comments

Comments
 (0)