agrs-sequelize-sdk 1.4.52 → 1.4.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/migrations/2026-05-17-PIXELS-FOLLOWUP.md +85 -85
- package/migrations/2026-05-17-add-platform-to-ad.js +19 -19
- package/migrations/2026-05-17-add-platform-to-adaccount.js +19 -19
- package/migrations/2026-05-17-add-platform-to-adperformance.js +19 -19
- package/migrations/2026-05-17-add-platform-to-adset.js +19 -19
- package/migrations/2026-05-17-add-platform-to-adsetperformance.js +19 -19
- package/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +19 -19
- package/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +19 -19
- package/migrations/2026-05-17-add-platform-to-article.js +19 -19
- package/migrations/2026-05-17-add-platform-to-campaign.js +19 -19
- package/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +19 -19
- package/migrations/2026-05-17-add-platform-to-dynamicfeed.js +19 -19
- package/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +19 -19
- package/migrations/2026-05-17-add-platform-to-pages.js +19 -19
- package/migrations/2026-05-17-add-platform-to-presets.js +19 -19
- package/migrations/2026-05-18-add-group-id-to-ai-campaign-queue.js +18 -18
- package/migrations/2026-05-18-add-platform-code-to-creation-logs.js +65 -65
- package/migrations/2026-05-18-add-platform-code-to-pixels.js +55 -55
- package/migrations/2026-05-18-add-platform-code-to-rsoc-feed-campaigns.js +55 -55
- package/migrations/2026-05-18-add-platform-date-index-to-adperformance.js +16 -16
- package/migrations/2026-05-18-add-platform-date-index-to-adsetperformance.js +16 -16
- package/migrations/2026-05-18-add-review-status-to-ad.js +36 -36
- package/migrations/2026-05-18-create-canonical-insights.js +84 -84
- package/migrations/2026-05-18-create-snapchat-public-profiles.js +68 -68
- package/migrations/2026-05-18-create-tiktok-identities.js +71 -71
- package/migrations/2026-05-18-create-tiktok-snapchat-campaigns.js +143 -143
- package/migrations/2026-05-18-create-tt-snp-adset-ad-tables.js +309 -309
- package/migrations/RUN_ME_MANUALLY_2026-05-17.sql +99 -99
- package/migrations/add-requested-from-dashboard-to-articles.js +17 -17
- package/migrations/change-adset-name-to-text.js +79 -79
- package/models/AICampaignQueue.js +152 -152
- package/models/AIGenerationLog.js +85 -85
- package/models/AIGenerationRequest.js +212 -212
- package/models/AdAccountValues.js +25 -25
- package/models/AdHistory.js +30 -30
- package/models/AdPerformance.js +104 -104
- package/models/AdSet.js +295 -295
- package/models/AdSetHistory.js +30 -30
- package/models/AdsetPerformance.js +137 -137
- package/models/AiArticleRetryQueue.js +157 -157
- package/models/AiCreationRetryQueue.js +134 -134
- package/models/ApiAuditLog.js +127 -127
- package/models/ApiToken.js +67 -67
- package/models/Article.js +222 -222
- package/models/AutomationRule.js +179 -179
- package/models/BannerTemplate.js +129 -129
- package/models/Buyers.js +25 -25
- package/models/Campaign.js +168 -163
- package/models/CampaignActionHistory.js +101 -101
- package/models/CampaignCreationLog.js +340 -340
- package/models/CampaignCreationLogV2.js +392 -392
- package/models/CampaignHistory.js +33 -33
- package/models/CampaignTag.js +46 -0
- package/models/CampaignTagAssignment.js +48 -0
- package/models/CanonicalInsights.js +68 -68
- package/models/Channel.js +55 -55
- package/models/Domain.js +44 -44
- package/models/DynamicFeed.js +218 -218
- package/models/ExplorAdsChannel.js +61 -61
- package/models/FacebookRetryQueue.js +163 -163
- package/models/Feed.js +33 -33
- package/models/FeedArticleConfiguration.js +80 -80
- package/models/FrontStoryChannel.js +59 -59
- package/models/FrontStoryChannelV2.js +60 -60
- package/models/GenericFlowRequest.js +114 -114
- package/models/MidoWebChannel.js +47 -47
- package/models/MineBrandBlocklist.js +40 -40
- package/models/MineChannel.js +42 -42
- package/models/MineRedirectDomain.js +36 -36
- package/models/MineWebhookEvent.js +53 -53
- package/models/Pages.js +117 -117
- package/models/PipelineExecution.js +59 -59
- package/models/PolicyDogsCreativeCache.js +50 -50
- package/models/PolicyDogsImageCache.js +30 -30
- package/models/Presets.js +40 -40
- package/models/PublicApiBatch.js +155 -155
- package/models/PublicApiBatchItem.js +166 -166
- package/models/PublicApiIdempotencyCache.js +135 -135
- package/models/RSOCFeedCampaign.js +387 -387
- package/models/RsocKeywordPerformance.js +110 -110
- package/models/RuleAction.js +90 -90
- package/models/RuleCondition.js +137 -137
- package/models/RuleExecution.js +107 -107
- package/models/RulesValues.js +56 -56
- package/models/SingularChannel.js +31 -31
- package/models/SnapchatAd.js +69 -69
- package/models/SnapchatAdSquad.js +92 -92
- package/models/SnapchatCampaign.js +69 -69
- package/models/SnapchatChannel.js +31 -31
- package/models/SnapchatPublicProfiles.js +67 -67
- package/models/SupportedLocale.js +23 -23
- package/models/SyncHistory.js +249 -249
- package/models/TTQChannel.js +42 -42
- package/models/TemplateMetadata.js +260 -260
- package/models/Tier2_AdAccounts.js +110 -110
- package/models/Tier2_Assets.js +70 -70
- package/models/Tier2_BusinessManagers.js +105 -105
- package/models/Tier2_CreditLines.js +99 -99
- package/models/Tier2_Pages.js +91 -91
- package/models/Tier2_Pixels.js +82 -82
- package/models/Tier2_Tokens.js +64 -64
- package/models/Tier2_UserAdAccounts.js +83 -83
- package/models/TikTokAd.js +71 -71
- package/models/TikTokAdGroup.js +82 -82
- package/models/TikTokCampaign.js +71 -71
- package/models/TiktokChannel.js +31 -31
- package/models/TiktokIdentities.js +65 -65
- package/models/TokenRotationState.js +121 -121
- package/models/TonicRSOCKeywordPerformance.js +122 -122
- package/models/Users.js +190 -185
- package/models/Vertical.js +25 -25
- package/models/newFiles.js +137 -137
- package/package.json +21 -19
- package/run.sh +214 -214
- package/services/sequelizeService.js +110 -110
- package/tarzo-skalio-integration-docs.md +691 -691
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
# Platform column normalization — follow-on work
|
|
2
|
-
|
|
3
|
-
## Tables skipped from the 2026-05-17 platform rollout
|
|
4
|
-
|
|
5
|
-
The following 4 tables were intentionally OMITTED from the 2026-05-17 platform-column
|
|
6
|
-
rollout because each already has a `platform` column of type VARCHAR with
|
|
7
|
-
capitalized values (e.g. "Facebook"). Adding an ENUM column with the same name
|
|
8
|
-
would either fail outright or destructively override existing data.
|
|
9
|
-
|
|
10
|
-
| Table | Existing column type | Existing values seen |
|
|
11
|
-
|--------------------------------|----------------------|--------------------------------------------------------|
|
|
12
|
-
| `Pixels` | varchar | "Facebook", "Tiktok", "Taboola", "Outbrain", "Yahoo" |
|
|
13
|
-
| `CampaignCreationLogs` | varchar(50) | "Facebook", "fb", NULL |
|
|
14
|
-
| `CampaignCreationLogsV2` | varchar(50) | "Facebook", "fb", NULL |
|
|
15
|
-
| `rsoc_feed_campaigns` | varchar | "Facebook", "fb" |
|
|
16
|
-
|
|
17
|
-
The rest of the rollout uses lowercase short codes: `fb`, `tt`, `snp`.
|
|
18
|
-
|
|
19
|
-
## Why we did not "just add another column"
|
|
20
|
-
|
|
21
|
-
A naive `addColumn("platform")` collides with the existing column name. A naive
|
|
22
|
-
`UPDATE` to lowercase the values would touch production data and is destructive.
|
|
23
|
-
Both violate the safety constraint of this rollout (additive only).
|
|
24
|
-
|
|
25
|
-
## Recommended path (separate plan)
|
|
26
|
-
|
|
27
|
-
For each of the 4 tables:
|
|
28
|
-
|
|
29
|
-
1. Add a new column `platform_code` ENUM('fb','tt','snp','tab','out','yh') NOT NULL DEFAULT 'fb'
|
|
30
|
-
2. Backfill in a single transaction. Example for Pixels:
|
|
31
|
-
```sql
|
|
32
|
-
UPDATE "Pixels" SET platform_code = CASE platform
|
|
33
|
-
WHEN 'Facebook' THEN 'fb'
|
|
34
|
-
WHEN 'Tiktok' THEN 'tt'
|
|
35
|
-
WHEN 'Taboola' THEN 'tab'
|
|
36
|
-
WHEN 'Outbrain' THEN 'out'
|
|
37
|
-
WHEN 'Yahoo' THEN 'yh'
|
|
38
|
-
ELSE 'fb'
|
|
39
|
-
END;
|
|
40
|
-
```
|
|
41
|
-
For CampaignCreationLogs / CampaignCreationLogsV2 / rsoc_feed_campaigns the
|
|
42
|
-
backfill is simpler:
|
|
43
|
-
```sql
|
|
44
|
-
UPDATE "CampaignCreationLogs" SET platform_code = CASE LOWER(COALESCE(platform, 'fb'))
|
|
45
|
-
WHEN 'facebook' THEN 'fb'
|
|
46
|
-
WHEN 'fb' THEN 'fb'
|
|
47
|
-
WHEN 'tiktok' THEN 'tt'
|
|
48
|
-
WHEN 'tt' THEN 'tt'
|
|
49
|
-
ELSE 'fb'
|
|
50
|
-
END;
|
|
51
|
-
```
|
|
52
|
-
3. Update server code to read `platform_code` for new logic; leave the legacy
|
|
53
|
-
`platform` column untouched for backward compat.
|
|
54
|
-
4. Eventually deprecate the legacy `platform` column and rename `platform_code`
|
|
55
|
-
→ `platform` once all callers have migrated. That happens in a separate,
|
|
56
|
-
later cleanup plan.
|
|
57
|
-
|
|
58
|
-
## Until then
|
|
59
|
-
|
|
60
|
-
The dashboard's platform adapter (created in the Phase 0 backend plan) MUST
|
|
61
|
-
normalize legacy `platform` values when comparing to the canonical fb/tt/snp
|
|
62
|
-
codes. Example normalizer:
|
|
63
|
-
|
|
64
|
-
```javascript
|
|
65
|
-
function normalizeLegacyPlatform(legacy) {
|
|
66
|
-
if (!legacy) return "fb";
|
|
67
|
-
const map = {
|
|
68
|
-
Facebook: "fb",
|
|
69
|
-
facebook: "fb",
|
|
70
|
-
FB: "fb",
|
|
71
|
-
fb: "fb",
|
|
72
|
-
Tiktok: "tt",
|
|
73
|
-
TikTok: "tt",
|
|
74
|
-
tiktok: "tt",
|
|
75
|
-
tt: "tt",
|
|
76
|
-
Snapchat: "snp",
|
|
77
|
-
snapchat: "snp",
|
|
78
|
-
snp: "snp",
|
|
79
|
-
Taboola: "tab",
|
|
80
|
-
Outbrain: "out",
|
|
81
|
-
Yahoo: "yh",
|
|
82
|
-
};
|
|
83
|
-
return map[legacy] || "fb";
|
|
84
|
-
}
|
|
85
|
-
```
|
|
1
|
+
# Platform column normalization — follow-on work
|
|
2
|
+
|
|
3
|
+
## Tables skipped from the 2026-05-17 platform rollout
|
|
4
|
+
|
|
5
|
+
The following 4 tables were intentionally OMITTED from the 2026-05-17 platform-column
|
|
6
|
+
rollout because each already has a `platform` column of type VARCHAR with
|
|
7
|
+
capitalized values (e.g. "Facebook"). Adding an ENUM column with the same name
|
|
8
|
+
would either fail outright or destructively override existing data.
|
|
9
|
+
|
|
10
|
+
| Table | Existing column type | Existing values seen |
|
|
11
|
+
|--------------------------------|----------------------|--------------------------------------------------------|
|
|
12
|
+
| `Pixels` | varchar | "Facebook", "Tiktok", "Taboola", "Outbrain", "Yahoo" |
|
|
13
|
+
| `CampaignCreationLogs` | varchar(50) | "Facebook", "fb", NULL |
|
|
14
|
+
| `CampaignCreationLogsV2` | varchar(50) | "Facebook", "fb", NULL |
|
|
15
|
+
| `rsoc_feed_campaigns` | varchar | "Facebook", "fb" |
|
|
16
|
+
|
|
17
|
+
The rest of the rollout uses lowercase short codes: `fb`, `tt`, `snp`.
|
|
18
|
+
|
|
19
|
+
## Why we did not "just add another column"
|
|
20
|
+
|
|
21
|
+
A naive `addColumn("platform")` collides with the existing column name. A naive
|
|
22
|
+
`UPDATE` to lowercase the values would touch production data and is destructive.
|
|
23
|
+
Both violate the safety constraint of this rollout (additive only).
|
|
24
|
+
|
|
25
|
+
## Recommended path (separate plan)
|
|
26
|
+
|
|
27
|
+
For each of the 4 tables:
|
|
28
|
+
|
|
29
|
+
1. Add a new column `platform_code` ENUM('fb','tt','snp','tab','out','yh') NOT NULL DEFAULT 'fb'
|
|
30
|
+
2. Backfill in a single transaction. Example for Pixels:
|
|
31
|
+
```sql
|
|
32
|
+
UPDATE "Pixels" SET platform_code = CASE platform
|
|
33
|
+
WHEN 'Facebook' THEN 'fb'
|
|
34
|
+
WHEN 'Tiktok' THEN 'tt'
|
|
35
|
+
WHEN 'Taboola' THEN 'tab'
|
|
36
|
+
WHEN 'Outbrain' THEN 'out'
|
|
37
|
+
WHEN 'Yahoo' THEN 'yh'
|
|
38
|
+
ELSE 'fb'
|
|
39
|
+
END;
|
|
40
|
+
```
|
|
41
|
+
For CampaignCreationLogs / CampaignCreationLogsV2 / rsoc_feed_campaigns the
|
|
42
|
+
backfill is simpler:
|
|
43
|
+
```sql
|
|
44
|
+
UPDATE "CampaignCreationLogs" SET platform_code = CASE LOWER(COALESCE(platform, 'fb'))
|
|
45
|
+
WHEN 'facebook' THEN 'fb'
|
|
46
|
+
WHEN 'fb' THEN 'fb'
|
|
47
|
+
WHEN 'tiktok' THEN 'tt'
|
|
48
|
+
WHEN 'tt' THEN 'tt'
|
|
49
|
+
ELSE 'fb'
|
|
50
|
+
END;
|
|
51
|
+
```
|
|
52
|
+
3. Update server code to read `platform_code` for new logic; leave the legacy
|
|
53
|
+
`platform` column untouched for backward compat.
|
|
54
|
+
4. Eventually deprecate the legacy `platform` column and rename `platform_code`
|
|
55
|
+
→ `platform` once all callers have migrated. That happens in a separate,
|
|
56
|
+
later cleanup plan.
|
|
57
|
+
|
|
58
|
+
## Until then
|
|
59
|
+
|
|
60
|
+
The dashboard's platform adapter (created in the Phase 0 backend plan) MUST
|
|
61
|
+
normalize legacy `platform` values when comparing to the canonical fb/tt/snp
|
|
62
|
+
codes. Example normalizer:
|
|
63
|
+
|
|
64
|
+
```javascript
|
|
65
|
+
function normalizeLegacyPlatform(legacy) {
|
|
66
|
+
if (!legacy) return "fb";
|
|
67
|
+
const map = {
|
|
68
|
+
Facebook: "fb",
|
|
69
|
+
facebook: "fb",
|
|
70
|
+
FB: "fb",
|
|
71
|
+
fb: "fb",
|
|
72
|
+
Tiktok: "tt",
|
|
73
|
+
TikTok: "tt",
|
|
74
|
+
tiktok: "tt",
|
|
75
|
+
tt: "tt",
|
|
76
|
+
Snapchat: "snp",
|
|
77
|
+
snapchat: "snp",
|
|
78
|
+
snp: "snp",
|
|
79
|
+
Taboola: "tab",
|
|
80
|
+
Outbrain: "out",
|
|
81
|
+
Yahoo: "yh",
|
|
82
|
+
};
|
|
83
|
+
return map[legacy] || "fb";
|
|
84
|
+
}
|
|
85
|
+
```
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
await queryInterface.addColumn("Ad", "platform", {
|
|
6
|
-
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
-
allowNull: false,
|
|
8
|
-
defaultValue: "fb",
|
|
9
|
-
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
await queryInterface.removeColumn("Ad", "platform");
|
|
15
|
-
await queryInterface.sequelize.query(
|
|
16
|
-
'DROP TYPE IF EXISTS "enum_Ad_platform";'
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn("Ad", "platform", {
|
|
6
|
+
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: "fb",
|
|
9
|
+
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
await queryInterface.removeColumn("Ad", "platform");
|
|
15
|
+
await queryInterface.sequelize.query(
|
|
16
|
+
'DROP TYPE IF EXISTS "enum_Ad_platform";'
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
await queryInterface.addColumn("AdAccount", "platform", {
|
|
6
|
-
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
-
allowNull: false,
|
|
8
|
-
defaultValue: "fb",
|
|
9
|
-
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
await queryInterface.removeColumn("AdAccount", "platform");
|
|
15
|
-
await queryInterface.sequelize.query(
|
|
16
|
-
'DROP TYPE IF EXISTS "enum_AdAccount_platform";'
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn("AdAccount", "platform", {
|
|
6
|
+
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: "fb",
|
|
9
|
+
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
await queryInterface.removeColumn("AdAccount", "platform");
|
|
15
|
+
await queryInterface.sequelize.query(
|
|
16
|
+
'DROP TYPE IF EXISTS "enum_AdAccount_platform";'
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
await queryInterface.addColumn("AdPerformance", "platform", {
|
|
6
|
-
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
-
allowNull: false,
|
|
8
|
-
defaultValue: "fb",
|
|
9
|
-
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
await queryInterface.removeColumn("AdPerformance", "platform");
|
|
15
|
-
await queryInterface.sequelize.query(
|
|
16
|
-
'DROP TYPE IF EXISTS "enum_AdPerformance_platform";'
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn("AdPerformance", "platform", {
|
|
6
|
+
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: "fb",
|
|
9
|
+
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
await queryInterface.removeColumn("AdPerformance", "platform");
|
|
15
|
+
await queryInterface.sequelize.query(
|
|
16
|
+
'DROP TYPE IF EXISTS "enum_AdPerformance_platform";'
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
await queryInterface.addColumn("AdSet", "platform", {
|
|
6
|
-
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
-
allowNull: false,
|
|
8
|
-
defaultValue: "fb",
|
|
9
|
-
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
await queryInterface.removeColumn("AdSet", "platform");
|
|
15
|
-
await queryInterface.sequelize.query(
|
|
16
|
-
'DROP TYPE IF EXISTS "enum_AdSet_platform";'
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn("AdSet", "platform", {
|
|
6
|
+
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: "fb",
|
|
9
|
+
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
await queryInterface.removeColumn("AdSet", "platform");
|
|
15
|
+
await queryInterface.sequelize.query(
|
|
16
|
+
'DROP TYPE IF EXISTS "enum_AdSet_platform";'
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
await queryInterface.addColumn("AdSetPerformance", "platform", {
|
|
6
|
-
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
-
allowNull: false,
|
|
8
|
-
defaultValue: "fb",
|
|
9
|
-
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
await queryInterface.removeColumn("AdSetPerformance", "platform");
|
|
15
|
-
await queryInterface.sequelize.query(
|
|
16
|
-
'DROP TYPE IF EXISTS "enum_AdSetPerformance_platform";'
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn("AdSetPerformance", "platform", {
|
|
6
|
+
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: "fb",
|
|
9
|
+
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
await queryInterface.removeColumn("AdSetPerformance", "platform");
|
|
15
|
+
await queryInterface.sequelize.query(
|
|
16
|
+
'DROP TYPE IF EXISTS "enum_AdSetPerformance_platform";'
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
await queryInterface.addColumn("ai_article_retry_queue", "platform", {
|
|
6
|
-
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
-
allowNull: false,
|
|
8
|
-
defaultValue: "fb",
|
|
9
|
-
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
await queryInterface.removeColumn("ai_article_retry_queue", "platform");
|
|
15
|
-
await queryInterface.sequelize.query(
|
|
16
|
-
'DROP TYPE IF EXISTS "enum_ai_article_retry_queue_platform";'
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn("ai_article_retry_queue", "platform", {
|
|
6
|
+
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: "fb",
|
|
9
|
+
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
await queryInterface.removeColumn("ai_article_retry_queue", "platform");
|
|
15
|
+
await queryInterface.sequelize.query(
|
|
16
|
+
'DROP TYPE IF EXISTS "enum_ai_article_retry_queue_platform";'
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
await queryInterface.addColumn("ai_campaign_queue", "platform", {
|
|
6
|
-
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
-
allowNull: false,
|
|
8
|
-
defaultValue: "fb",
|
|
9
|
-
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
await queryInterface.removeColumn("ai_campaign_queue", "platform");
|
|
15
|
-
await queryInterface.sequelize.query(
|
|
16
|
-
'DROP TYPE IF EXISTS "enum_ai_campaign_queue_platform";'
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn("ai_campaign_queue", "platform", {
|
|
6
|
+
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: "fb",
|
|
9
|
+
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
await queryInterface.removeColumn("ai_campaign_queue", "platform");
|
|
15
|
+
await queryInterface.sequelize.query(
|
|
16
|
+
'DROP TYPE IF EXISTS "enum_ai_campaign_queue_platform";'
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
await queryInterface.addColumn("articles", "platform", {
|
|
6
|
-
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
-
allowNull: false,
|
|
8
|
-
defaultValue: "fb",
|
|
9
|
-
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
await queryInterface.removeColumn("articles", "platform");
|
|
15
|
-
await queryInterface.sequelize.query(
|
|
16
|
-
'DROP TYPE IF EXISTS "enum_articles_platform";'
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn("articles", "platform", {
|
|
6
|
+
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: "fb",
|
|
9
|
+
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
await queryInterface.removeColumn("articles", "platform");
|
|
15
|
+
await queryInterface.sequelize.query(
|
|
16
|
+
'DROP TYPE IF EXISTS "enum_articles_platform";'
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
await queryInterface.addColumn("Campaign", "platform", {
|
|
6
|
-
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
-
allowNull: false,
|
|
8
|
-
defaultValue: "fb",
|
|
9
|
-
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
await queryInterface.removeColumn("Campaign", "platform");
|
|
15
|
-
await queryInterface.sequelize.query(
|
|
16
|
-
'DROP TYPE IF EXISTS "enum_Campaign_platform";'
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn("Campaign", "platform", {
|
|
6
|
+
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: "fb",
|
|
9
|
+
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
await queryInterface.removeColumn("Campaign", "platform");
|
|
15
|
+
await queryInterface.sequelize.query(
|
|
16
|
+
'DROP TYPE IF EXISTS "enum_Campaign_platform";'
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
await queryInterface.addColumn("CodefuelCampaigns", "platform", {
|
|
6
|
-
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
-
allowNull: false,
|
|
8
|
-
defaultValue: "fb",
|
|
9
|
-
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
await queryInterface.removeColumn("CodefuelCampaigns", "platform");
|
|
15
|
-
await queryInterface.sequelize.query(
|
|
16
|
-
'DROP TYPE IF EXISTS "enum_CodefuelCampaigns_platform";'
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn("CodefuelCampaigns", "platform", {
|
|
6
|
+
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: "fb",
|
|
9
|
+
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
await queryInterface.removeColumn("CodefuelCampaigns", "platform");
|
|
15
|
+
await queryInterface.sequelize.query(
|
|
16
|
+
'DROP TYPE IF EXISTS "enum_CodefuelCampaigns_platform";'
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
await queryInterface.addColumn("dynamic_feeds", "platform", {
|
|
6
|
-
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
-
allowNull: false,
|
|
8
|
-
defaultValue: "fb",
|
|
9
|
-
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
await queryInterface.removeColumn("dynamic_feeds", "platform");
|
|
15
|
-
await queryInterface.sequelize.query(
|
|
16
|
-
'DROP TYPE IF EXISTS "enum_dynamic_feeds_platform";'
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn("dynamic_feeds", "platform", {
|
|
6
|
+
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: "fb",
|
|
9
|
+
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
await queryInterface.removeColumn("dynamic_feeds", "platform");
|
|
15
|
+
await queryInterface.sequelize.query(
|
|
16
|
+
'DROP TYPE IF EXISTS "enum_dynamic_feeds_platform";'
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
await queryInterface.addColumn("facebook_retry_queue", "platform", {
|
|
6
|
-
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
-
allowNull: false,
|
|
8
|
-
defaultValue: "fb",
|
|
9
|
-
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
down: async (queryInterface, Sequelize) => {
|
|
14
|
-
await queryInterface.removeColumn("facebook_retry_queue", "platform");
|
|
15
|
-
await queryInterface.sequelize.query(
|
|
16
|
-
'DROP TYPE IF EXISTS "enum_facebook_retry_queue_platform";'
|
|
17
|
-
);
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.addColumn("facebook_retry_queue", "platform", {
|
|
6
|
+
type: Sequelize.ENUM("fb", "tt", "snp"),
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: "fb",
|
|
9
|
+
comment: "Ad platform identifier: fb=Facebook, tt=TikTok, snp=Snapchat",
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
await queryInterface.removeColumn("facebook_retry_queue", "platform");
|
|
15
|
+
await queryInterface.sequelize.query(
|
|
16
|
+
'DROP TYPE IF EXISTS "enum_facebook_retry_queue_platform";'
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
};
|