@zodic/shared 0.0.26 → 0.0.28

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 (26) hide show
  1. package/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/d379cf52b047a184ecf29a10a32b971cde5e2c256717041a7cd396844038970d.sqlite-shm +0 -0
  2. package/db/migrations/{0000_dusty_green_goblin.sql → 0000_fearless_dust.sql} +68 -19
  3. package/db/migrations/0001_known_pretty_boy.sql +20 -0
  4. package/db/migrations/0002_exotic_maria_hill.sql +2 -0
  5. package/db/migrations/meta/0000_snapshot.json +371 -22
  6. package/db/migrations/meta/0001_snapshot.json +239 -26
  7. package/db/migrations/meta/0002_snapshot.json +239 -26
  8. package/db/migrations/meta/_journal.json +6 -55
  9. package/db/schema.ts +6 -6
  10. package/package.json +4 -3
  11. package/db/migrations/0001_low_tattoo.sql +0 -20
  12. package/db/migrations/0002_condemned_turbo.sql +0 -2
  13. package/db/migrations/0003_cynical_frog_thor.sql +0 -32
  14. package/db/migrations/0004_light_masked_marvel.sql +0 -130
  15. package/db/migrations/0005_silky_dagger.sql +0 -1
  16. package/db/migrations/0006_low_silver_centurion.sql +0 -26
  17. package/db/migrations/0007_complex_tarantula.sql +0 -18
  18. package/db/migrations/0008_ancient_doomsday.sql +0 -15
  19. package/db/migrations/0009_odd_metal_master.sql +0 -33
  20. package/db/migrations/meta/0003_snapshot.json +0 -1458
  21. package/db/migrations/meta/0004_snapshot.json +0 -1480
  22. package/db/migrations/meta/0005_snapshot.json +0 -1487
  23. package/db/migrations/meta/0006_snapshot.json +0 -1487
  24. package/db/migrations/meta/0007_snapshot.json +0 -1487
  25. package/db/migrations/meta/0008_snapshot.json +0 -1590
  26. package/db/migrations/meta/0009_snapshot.json +0 -1590
@@ -1,130 +0,0 @@
1
- PRAGMA foreign_keys=OFF;--> statement-breakpoint
2
- CREATE TABLE `__new_artifact_faceswap` (
3
- `id` text PRIMARY KEY NOT NULL,
4
- `user_artifact_id` text NOT NULL,
5
- `face_swapped_image_url` text,
6
- `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
7
- `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
8
- FOREIGN KEY (`user_artifact_id`) REFERENCES `user_artifacts`(`id`) ON UPDATE no action ON DELETE cascade
9
- );
10
- --> statement-breakpoint
11
- INSERT INTO `__new_artifact_faceswap`("id", "user_artifact_id", "face_swapped_image_url", "created_at", "updated_at") SELECT "id", "user_artifact_id", "face_swapped_image_url", "created_at", "updated_at" FROM `artifact_faceswap`;--> statement-breakpoint
12
- DROP TABLE `artifact_faceswap`;--> statement-breakpoint
13
- ALTER TABLE `__new_artifact_faceswap` RENAME TO `artifact_faceswap`;--> statement-breakpoint
14
- PRAGMA foreign_keys=ON;--> statement-breakpoint
15
- CREATE TABLE `__new_credits_transactions` (
16
- `id` text PRIMARY KEY NOT NULL,
17
- `user_id` text NOT NULL,
18
- `type` text NOT NULL,
19
- `amount` integer NOT NULL,
20
- `description` text,
21
- `product_type` text,
22
- `product_id` text,
23
- `payment_id` text,
24
- `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
25
- `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
26
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
27
- );
28
- --> statement-breakpoint
29
- INSERT INTO `__new_credits_transactions`("id", "user_id", "type", "amount", "description", "product_type", "product_id", "payment_id", "created_at", "updated_at") SELECT "id", "user_id", "type", "amount", "description", "product_type", "product_id", "payment_id", "created_at", "updated_at" FROM `credits_transactions`;--> statement-breakpoint
30
- DROP TABLE `credits_transactions`;--> statement-breakpoint
31
- ALTER TABLE `__new_credits_transactions` RENAME TO `credits_transactions`;--> statement-breakpoint
32
- CREATE INDEX `credits_transactions_user_id_idx` ON `credits_transactions` (`user_id`);--> statement-breakpoint
33
- CREATE TABLE `__new_generations` (
34
- `id` text PRIMARY KEY NOT NULL,
35
- `user_id` text NOT NULL,
36
- `artifact_id` text,
37
- `user_artifact_id` text,
38
- `gender` text,
39
- `concept_combination_id` text,
40
- `type` text NOT NULL,
41
- `status` text DEFAULT 'pending' NOT NULL,
42
- `url` text,
43
- `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
44
- `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
45
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
46
- FOREIGN KEY (`artifact_id`) REFERENCES `artifacts`(`id`) ON UPDATE no action ON DELETE cascade,
47
- FOREIGN KEY (`user_artifact_id`) REFERENCES `user_artifacts`(`id`) ON UPDATE no action ON DELETE cascade,
48
- FOREIGN KEY (`concept_combination_id`) REFERENCES `concept_combinations`(`id`) ON UPDATE no action ON DELETE cascade
49
- );
50
- --> statement-breakpoint
51
- INSERT INTO `__new_generations`("id", "user_id", "artifact_id", "user_artifact_id", "gender", "concept_combination_id", "type", "status", "url", "created_at", "updated_at") SELECT "id", "user_id", "artifact_id", "user_artifact_id", "gender", "concept_combination_id", "type", "status", "url", "created_at", "updated_at" FROM `generations`;--> statement-breakpoint
52
- DROP TABLE `generations`;--> statement-breakpoint
53
- ALTER TABLE `__new_generations` RENAME TO `generations`;--> statement-breakpoint
54
- CREATE INDEX `generations_user_id_idx` ON `generations` (`user_id`);--> statement-breakpoint
55
- CREATE INDEX `generations_concept_combination_id_idx` ON `generations` (`concept_combination_id`);--> statement-breakpoint
56
- CREATE TABLE `__new_user_artifacts` (
57
- `id` text PRIMARY KEY NOT NULL,
58
- `user_id` text NOT NULL,
59
- `user_concept_id` text NOT NULL,
60
- `artifact_id` text NOT NULL,
61
- `gender` text NOT NULL,
62
- `archetype_index` text NOT NULL,
63
- `post_image_id` text,
64
- `reel_image_id` text,
65
- `post_image_url` text,
66
- `reel_image_url` text,
67
- `post_generation_id` text,
68
- `reel_generation_id` text,
69
- `status` text DEFAULT 'pending' NOT NULL,
70
- `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
71
- `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
72
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
73
- FOREIGN KEY (`user_concept_id`) REFERENCES `user_concepts`(`id`) ON UPDATE no action ON DELETE cascade,
74
- FOREIGN KEY (`artifact_id`) REFERENCES `artifacts`(`id`) ON UPDATE no action ON DELETE cascade
75
- );
76
- --> statement-breakpoint
77
- INSERT INTO `__new_user_artifacts`("id", "user_id", "user_concept_id", "artifact_id", "gender", "archetype_index", "post_image_id", "reel_image_id", "post_image_url", "reel_image_url", "post_generation_id", "reel_generation_id", "status", "created_at", "updated_at") SELECT "id", "user_id", "user_concept_id", "artifact_id", "gender", "archetype_index", "post_image_id", "reel_image_id", "post_image_url", "reel_image_url", "post_generation_id", "reel_generation_id", "status", "created_at", "updated_at" FROM `user_artifacts`;--> statement-breakpoint
78
- DROP TABLE `user_artifacts`;--> statement-breakpoint
79
- ALTER TABLE `__new_user_artifacts` RENAME TO `user_artifacts`;--> statement-breakpoint
80
- CREATE INDEX `user_artifacts_user_id_idx` ON `user_artifacts` (`user_id`);--> statement-breakpoint
81
- CREATE INDEX `user_artifacts_artifact_id_idx` ON `user_artifacts` (`artifact_id`);--> statement-breakpoint
82
- CREATE INDEX `user_artifacts_status_idx` ON `user_artifacts` (`status`);--> statement-breakpoint
83
- CREATE TABLE `__new_user_concepts` (
84
- `id` text PRIMARY KEY NOT NULL,
85
- `user_id` text NOT NULL,
86
- `concept_id` text NOT NULL,
87
- `concept_combination_id` text NOT NULL,
88
- `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
89
- `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
90
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
91
- FOREIGN KEY (`concept_id`) REFERENCES `concepts`(`id`) ON UPDATE no action ON DELETE cascade,
92
- FOREIGN KEY (`concept_combination_id`) REFERENCES `concept_combinations`(`id`) ON UPDATE no action ON DELETE cascade
93
- );
94
- --> statement-breakpoint
95
- INSERT INTO `__new_user_concepts`("id", "user_id", "concept_id", "concept_combination_id", "created_at", "updated_at") SELECT "id", "user_id", "concept_id", "concept_combination_id", "created_at", "updated_at" FROM `user_concepts`;--> statement-breakpoint
96
- DROP TABLE `user_concepts`;--> statement-breakpoint
97
- ALTER TABLE `__new_user_concepts` RENAME TO `user_concepts`;--> statement-breakpoint
98
- CREATE INDEX `user_concepts_user_id_idx` ON `user_concepts` (`user_id`);--> statement-breakpoint
99
- CREATE INDEX `user_concepts_concept_id_idx` ON `user_concepts` (`concept_id`);--> statement-breakpoint
100
- CREATE TABLE `__new_users` (
101
- `id` text PRIMARY KEY NOT NULL,
102
- `email` text NOT NULL,
103
- `name` text NOT NULL,
104
- `profile_image` text,
105
- `user_photo_id` text,
106
- `user_photo_url` text,
107
- `gender` text,
108
- `day` integer,
109
- `month` integer,
110
- `year` integer,
111
- `hour` integer,
112
- `min` integer,
113
- `latitude` real,
114
- `longitude` real,
115
- `tzone` real,
116
- `instagram_username` text,
117
- `credits_balance` integer,
118
- `total_credits_earned` integer DEFAULT 0,
119
- `last_transaction_at` integer,
120
- `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
121
- `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL
122
- );
123
- --> statement-breakpoint
124
- INSERT INTO `__new_users`("id", "email", "name", "profile_image", "user_photo_id", "user_photo_url", "gender", "day", "month", "year", "hour", "min", "latitude", "longitude", "tzone", "instagram_username", "credits_balance", "total_credits_earned", "last_transaction_at", "created_at", "updated_at") SELECT "id", "email", "name", "profile_image", "user_photo_id", "user_photo_url", "gender", "day", "month", "year", "hour", "min", "latitude", "longitude", "tzone", "instagram_username", "credits_balance", "total_credits_earned", "last_transaction_at", "created_at", "updated_at" FROM `users`;--> statement-breakpoint
125
- DROP TABLE `users`;--> statement-breakpoint
126
- ALTER TABLE `__new_users` RENAME TO `users`;--> statement-breakpoint
127
- CREATE UNIQUE INDEX `users_email_unique` ON `users` (`email`);--> statement-breakpoint
128
- CREATE INDEX `users_email_idx` ON `users` (`email`);--> statement-breakpoint
129
- ALTER TABLE `artifact_video_generation` ADD `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL;--> statement-breakpoint
130
- ALTER TABLE `artifact_video_generation` ADD `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL;
@@ -1 +0,0 @@
1
- ALTER TABLE `generations` ADD `archetype_index` integer;
@@ -1,26 +0,0 @@
1
- PRAGMA foreign_keys=OFF;--> statement-breakpoint
2
- CREATE TABLE `__new_generations` (
3
- `id` text PRIMARY KEY NOT NULL,
4
- `user_id` text,
5
- `artifact_id` text,
6
- `archetype_index` integer,
7
- `user_artifact_id` text,
8
- `gender` text,
9
- `concept_combination_id` text,
10
- `type` text NOT NULL,
11
- `status` text DEFAULT 'pending' NOT NULL,
12
- `url` text,
13
- `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
14
- `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
15
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
16
- FOREIGN KEY (`artifact_id`) REFERENCES `artifacts`(`id`) ON UPDATE no action ON DELETE cascade,
17
- FOREIGN KEY (`user_artifact_id`) REFERENCES `user_artifacts`(`id`) ON UPDATE no action ON DELETE cascade,
18
- FOREIGN KEY (`concept_combination_id`) REFERENCES `concept_combinations`(`id`) ON UPDATE no action ON DELETE cascade
19
- );
20
- --> statement-breakpoint
21
- INSERT INTO `__new_generations`("id", "user_id", "artifact_id", "archetype_index", "user_artifact_id", "gender", "concept_combination_id", "type", "status", "url", "created_at", "updated_at") SELECT "id", "user_id", "artifact_id", "archetype_index", "user_artifact_id", "gender", "concept_combination_id", "type", "status", "url", "created_at", "updated_at" FROM `generations`;--> statement-breakpoint
22
- DROP TABLE `generations`;--> statement-breakpoint
23
- ALTER TABLE `__new_generations` RENAME TO `generations`;--> statement-breakpoint
24
- PRAGMA foreign_keys=ON;--> statement-breakpoint
25
- CREATE INDEX `generations_user_id_idx` ON `generations` (`user_id`);--> statement-breakpoint
26
- CREATE INDEX `generations_concept_combination_id_idx` ON `generations` (`concept_combination_id`);
@@ -1,18 +0,0 @@
1
- PRAGMA foreign_keys=OFF;--> statement-breakpoint
2
- CREATE TABLE `__new_astro_features` (
3
- `id` text PRIMARY KEY NOT NULL,
4
- `user_id` text NOT NULL,
5
- `feature_type` text NOT NULL,
6
- `name` text NOT NULL,
7
- `description` text,
8
- `percentage` real,
9
- `order` integer,
10
- `prominent_id` integer,
11
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
12
- );
13
- --> statement-breakpoint
14
- INSERT INTO `__new_astro_features`("id", "user_id", "feature_type", "name", "description", "percentage", "order", "prominent_id") SELECT "id", "user_id", "feature_type", "name", "description", "percentage", "order", "prominent_id" FROM `astro_features`;--> statement-breakpoint
15
- DROP TABLE `astro_features`;--> statement-breakpoint
16
- ALTER TABLE `__new_astro_features` RENAME TO `astro_features`;--> statement-breakpoint
17
- PRAGMA foreign_keys=ON;--> statement-breakpoint
18
- CREATE INDEX `astro_features_user_id_idx` ON `astro_features` (`user_id`);
@@ -1,15 +0,0 @@
1
- CREATE TABLE `astro_aspects` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `user_id` text NOT NULL,
4
- `aspecting_planet` text NOT NULL,
5
- `aspected_planet` text NOT NULL,
6
- `aspecting_planet_id` integer NOT NULL,
7
- `aspected_planet_id` integer NOT NULL,
8
- `type` text NOT NULL,
9
- `orb` real NOT NULL,
10
- `diff` real NOT NULL,
11
- `created_at` integer DEFAULT CURRENT_TIMESTAMP,
12
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
13
- );
14
- --> statement-breakpoint
15
- CREATE INDEX `astro_aspects_user_id_idx` ON `astro_aspects` (`user_id`);
@@ -1,33 +0,0 @@
1
- PRAGMA foreign_keys=OFF;--> statement-breakpoint
2
- CREATE TABLE `__new_users` (
3
- `id` text PRIMARY KEY NOT NULL,
4
- `email` text NOT NULL,
5
- `name` text NOT NULL,
6
- `profile_image` text,
7
- `user_photo_id` text,
8
- `user_photo_url` text,
9
- `gender` text,
10
- `day` integer NOT NULL,
11
- `month` integer NOT NULL,
12
- `year` integer NOT NULL,
13
- `hour` integer,
14
- `min` integer,
15
- `latitude` real NOT NULL,
16
- `longitude` real NOT NULL,
17
- `tzone` real,
18
- `instagram_username` text,
19
- `tiktok_username` text,
20
- `credits_balance` integer DEFAULT 0 NOT NULL,
21
- `total_credits_earned` integer DEFAULT 0 NOT NULL,
22
- `last_transaction_at` integer,
23
- `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
24
- `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL
25
- );
26
- --> statement-breakpoint
27
- INSERT INTO `__new_users`("id", "email", "name", "profile_image", "user_photo_id", "user_photo_url", "gender", "day", "month", "year", "hour", "min", "latitude", "longitude", "tzone", "instagram_username", "tiktok_username", "credits_balance", "total_credits_earned", "last_transaction_at", "created_at", "updated_at") SELECT "id", "email", "name", "profile_image", "user_photo_id", "user_photo_url", "gender", "day", "month", "year", "hour", "min", "latitude", "longitude", "tzone", "instagram_username", "tiktok_username", "credits_balance", "total_credits_earned", "last_transaction_at", "created_at", "updated_at" FROM `users`;--> statement-breakpoint
28
- DROP TABLE `users`;--> statement-breakpoint
29
- ALTER TABLE `__new_users` RENAME TO `users`;--> statement-breakpoint
30
- PRAGMA foreign_keys=ON;--> statement-breakpoint
31
- CREATE UNIQUE INDEX `users_email_unique` ON `users` (`email`);--> statement-breakpoint
32
- CREATE INDEX `users_email_idx` ON `users` (`email`);--> statement-breakpoint
33
- ALTER TABLE `astro_aspects` DROP COLUMN `created_at`;