agrs-sequelize-sdk 1.4.59 → 1.4.60

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.
Files changed (120) hide show
  1. package/migrations/2026-05-17-PIXELS-FOLLOWUP.md +85 -85
  2. package/migrations/2026-05-17-add-platform-to-ad.js +19 -19
  3. package/migrations/2026-05-17-add-platform-to-adaccount.js +19 -19
  4. package/migrations/2026-05-17-add-platform-to-adperformance.js +19 -19
  5. package/migrations/2026-05-17-add-platform-to-adset.js +19 -19
  6. package/migrations/2026-05-17-add-platform-to-adsetperformance.js +19 -19
  7. package/migrations/2026-05-17-add-platform-to-aiarticleretryqueue.js +19 -19
  8. package/migrations/2026-05-17-add-platform-to-aicampaignqueue.js +19 -19
  9. package/migrations/2026-05-17-add-platform-to-article.js +19 -19
  10. package/migrations/2026-05-17-add-platform-to-campaign.js +19 -19
  11. package/migrations/2026-05-17-add-platform-to-codefuelcampaign.js +19 -19
  12. package/migrations/2026-05-17-add-platform-to-dynamicfeed.js +19 -19
  13. package/migrations/2026-05-17-add-platform-to-facebookretryqueue.js +19 -19
  14. package/migrations/2026-05-17-add-platform-to-pages.js +19 -19
  15. package/migrations/2026-05-17-add-platform-to-presets.js +19 -19
  16. package/migrations/2026-05-18-add-group-id-to-ai-campaign-queue.js +18 -18
  17. package/migrations/2026-05-18-add-platform-code-to-creation-logs.js +65 -65
  18. package/migrations/2026-05-18-add-platform-code-to-pixels.js +55 -55
  19. package/migrations/2026-05-18-add-platform-code-to-rsoc-feed-campaigns.js +55 -55
  20. package/migrations/2026-05-18-add-platform-date-index-to-adperformance.js +16 -16
  21. package/migrations/2026-05-18-add-platform-date-index-to-adsetperformance.js +16 -16
  22. package/migrations/2026-05-18-add-review-status-to-ad.js +36 -36
  23. package/migrations/2026-05-18-create-canonical-insights.js +84 -84
  24. package/migrations/2026-05-18-create-snapchat-public-profiles.js +68 -68
  25. package/migrations/2026-05-18-create-tiktok-identities.js +71 -71
  26. package/migrations/2026-05-18-create-tiktok-snapchat-campaigns.js +143 -143
  27. package/migrations/2026-05-18-create-tt-snp-adset-ad-tables.js +309 -309
  28. package/migrations/RUN_ME_MANUALLY_2026-05-17.sql +99 -99
  29. package/migrations/add-requested-from-dashboard-to-articles.js +17 -17
  30. package/migrations/change-adset-name-to-text.js +79 -79
  31. package/models/AICampaignQueue.js +151 -151
  32. package/models/AIGenerationLog.js +85 -85
  33. package/models/AIGenerationRequest.js +212 -212
  34. package/models/AdAccountValues.js +25 -25
  35. package/models/AdHistory.js +30 -30
  36. package/models/AdPerformance.js +104 -104
  37. package/models/AdSet.js +295 -295
  38. package/models/AdSetHistory.js +30 -30
  39. package/models/AdsetPerformance.js +137 -137
  40. package/models/AiArticleRetryQueue.js +157 -157
  41. package/models/AiCreationRetryQueue.js +134 -134
  42. package/models/ApiAuditLog.js +127 -127
  43. package/models/ApiToken.js +67 -67
  44. package/models/Article.js +222 -222
  45. package/models/AutomationRule.js +179 -179
  46. package/models/BannerTemplate.js +129 -129
  47. package/models/Buyers.js +25 -25
  48. package/models/Campaign.js +168 -168
  49. package/models/CampaignActionHistory.js +101 -101
  50. package/models/CampaignCreationLog.js +340 -340
  51. package/models/CampaignCreationLogV2.js +392 -392
  52. package/models/CampaignHistory.js +33 -33
  53. package/models/CampaignTag.js +46 -46
  54. package/models/CampaignTagAssignment.js +48 -48
  55. package/models/CanonicalInsights.js +68 -68
  56. package/models/Channel.js +55 -55
  57. package/models/Domain.js +44 -44
  58. package/models/DynamicFeed.js +218 -218
  59. package/models/ExplorAdsChannel.js +61 -61
  60. package/models/FacebookRetryQueue.js +163 -163
  61. package/models/Feed.js +33 -33
  62. package/models/FeedArticleConfiguration.js +80 -80
  63. package/models/FrontStoryChannel.js +59 -59
  64. package/models/FrontStoryChannelV2.js +60 -60
  65. package/models/GenericFlowRequest.js +114 -114
  66. package/models/MidoWebChannel.js +47 -47
  67. package/models/MineBrandBlocklist.js +56 -56
  68. package/models/MineBrandConfig.js +26 -26
  69. package/models/MineChannel.js +47 -47
  70. package/models/MineRedirectDomain.js +42 -42
  71. package/models/MineWebhookEvent.js +53 -53
  72. package/models/Pages.js +117 -117
  73. package/models/PipelineExecution.js +59 -59
  74. package/models/PolicyDogsCreativeCache.js +50 -50
  75. package/models/PolicyDogsImageCache.js +30 -30
  76. package/models/Presets.js +40 -40
  77. package/models/PublicApiBatch.js +155 -155
  78. package/models/PublicApiBatchItem.js +166 -166
  79. package/models/PublicApiIdempotencyCache.js +135 -135
  80. package/models/RSOCFeedCampaign.js +387 -387
  81. package/models/RSOCFeedConfig.js +46 -46
  82. package/models/RSOCRedirectWsCode.js +22 -22
  83. package/models/RsocKeywordPerformance.js +110 -110
  84. package/models/RuleAction.js +90 -90
  85. package/models/RuleCondition.js +137 -137
  86. package/models/RuleExecution.js +107 -107
  87. package/models/RulesValues.js +56 -56
  88. package/models/SingularChannel.js +31 -31
  89. package/models/SnapchatAd.js +69 -69
  90. package/models/SnapchatAdSquad.js +92 -92
  91. package/models/SnapchatCampaign.js +69 -69
  92. package/models/SnapchatChannel.js +31 -31
  93. package/models/SnapchatPublicProfiles.js +67 -67
  94. package/models/SupportedLocale.js +23 -23
  95. package/models/SyncHistory.js +249 -249
  96. package/models/TTQChannel.js +42 -42
  97. package/models/Team.js +33 -43
  98. package/models/TemplateMetadata.js +260 -260
  99. package/models/Tier2_AdAccounts.js +110 -110
  100. package/models/Tier2_Assets.js +70 -70
  101. package/models/Tier2_BusinessManagers.js +105 -105
  102. package/models/Tier2_CreditLines.js +99 -99
  103. package/models/Tier2_Pages.js +91 -91
  104. package/models/Tier2_Pixels.js +82 -82
  105. package/models/Tier2_Tokens.js +64 -64
  106. package/models/Tier2_UserAdAccounts.js +83 -83
  107. package/models/TikTokAd.js +71 -71
  108. package/models/TikTokAdGroup.js +82 -82
  109. package/models/TikTokCampaign.js +71 -71
  110. package/models/TiktokChannel.js +31 -31
  111. package/models/TiktokIdentities.js +65 -65
  112. package/models/TokenRotationState.js +121 -121
  113. package/models/TonicRSOCKeywordPerformance.js +122 -122
  114. package/models/Users.js +204 -204
  115. package/models/Vertical.js +25 -25
  116. package/models/newFiles.js +137 -137
  117. package/package.json +21 -19
  118. package/run.sh +214 -214
  119. package/services/sequelizeService.js +110 -110
  120. 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
+ };