@zodic/shared 0.0.24 → 0.0.26

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.
@@ -0,0 +1,15 @@
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`);
@@ -0,0 +1,33 @@
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`;