-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
7,374 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
ALTER TABLE `addresses` RENAME COLUMN `postalCode` TO `postal_code`;--> statement-breakpoint | ||
ALTER TABLE `addresses` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `addresses` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `carts` RENAME COLUMN `paymentIntentId` TO `payment_intent_id`;--> statement-breakpoint | ||
ALTER TABLE `carts` RENAME COLUMN `clientSecret` TO `client_secret`;--> statement-breakpoint | ||
ALTER TABLE `carts` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `carts` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `email_preferences` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `email_preferences` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `storeId` TO `store_id`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `stripePaymentIntentId` TO `stripe_payment_intent_id`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `stripePaymentIntentStatus` TO `stripe_payment_intent_status`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `addressId` TO `address_id`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `stripeAccountId` TO `stripe_account_id`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `stripeAccountCreatedAt` TO `stripe_account_created_at`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `stripeAccountExpiresAt` TO `stripe_account_expires_at`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `detailsSubmitted` TO `details_submitted`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `products` RENAME COLUMN `storeId` TO `store_id`;--> statement-breakpoint | ||
ALTER TABLE `products` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `products` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `stores` RENAME COLUMN `userId` TO `user_id`;--> statement-breakpoint | ||
ALTER TABLE `stores` RENAME COLUMN `stripeAccountId` TO `stripe_account_id`;--> statement-breakpoint | ||
ALTER TABLE `stores` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `stores` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `addresses` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `addresses` MODIFY COLUMN `updated_at` timestamp NOT NULL ON UPDATE CURRENT_TIMESTAMP;--> statement-breakpoint | ||
ALTER TABLE `carts` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `carts` MODIFY COLUMN `updated_at` timestamp NOT NULL ON UPDATE CURRENT_TIMESTAMP;--> statement-breakpoint | ||
ALTER TABLE `email_preferences` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `email_preferences` MODIFY COLUMN `updated_at` timestamp NOT NULL ON UPDATE CURRENT_TIMESTAMP;--> statement-breakpoint | ||
ALTER TABLE `orders` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `orders` MODIFY COLUMN `updated_at` timestamp NOT NULL ON UPDATE CURRENT_TIMESTAMP;--> statement-breakpoint | ||
ALTER TABLE `payments` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `payments` MODIFY COLUMN `updated_at` timestamp NOT NULL ON UPDATE CURRENT_TIMESTAMP;--> statement-breakpoint | ||
ALTER TABLE `products` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `products` MODIFY COLUMN `updated_at` timestamp NOT NULL ON UPDATE CURRENT_TIMESTAMP;--> statement-breakpoint | ||
ALTER TABLE `stores` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `stores` MODIFY COLUMN `updated_at` timestamp NOT NULL ON UPDATE CURRENT_TIMESTAMP; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ALTER TABLE `payments` RENAME COLUMN `storeId` TO `store_id`;--> statement-breakpoint | ||
ALTER TABLE `products` RENAME COLUMN `store_id` TO `storeId`;--> statement-breakpoint | ||
ALTER TABLE `addresses` MODIFY COLUMN `updated_at` timestamp ON UPDATE CURRENT_TIMESTAMP;--> statement-breakpoint | ||
ALTER TABLE `carts` MODIFY COLUMN `updated_at` timestamp ON UPDATE CURRENT_TIMESTAMP;--> statement-breakpoint | ||
ALTER TABLE `email_preferences` MODIFY COLUMN `updated_at` timestamp ON UPDATE CURRENT_TIMESTAMP;--> statement-breakpoint | ||
ALTER TABLE `orders` MODIFY COLUMN `updated_at` timestamp ON UPDATE CURRENT_TIMESTAMP;--> statement-breakpoint | ||
ALTER TABLE `payments` MODIFY COLUMN `updated_at` timestamp ON UPDATE CURRENT_TIMESTAMP;--> statement-breakpoint | ||
ALTER TABLE `products` MODIFY COLUMN `updated_at` timestamp ON UPDATE CURRENT_TIMESTAMP;--> statement-breakpoint | ||
ALTER TABLE `stores` MODIFY COLUMN `updated_at` timestamp ON UPDATE CURRENT_TIMESTAMP; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
ALTER TABLE `addresses` RENAME COLUMN `postal_code` TO `postalCode`;--> statement-breakpoint | ||
ALTER TABLE `addresses` RENAME COLUMN `created_at` TO `createdAt`;--> statement-breakpoint | ||
ALTER TABLE `addresses` RENAME COLUMN `updated_at` TO `updatedAt`;--> statement-breakpoint | ||
ALTER TABLE `carts` RENAME COLUMN `payment_intent_id` TO `paymentIntentId`;--> statement-breakpoint | ||
ALTER TABLE `carts` RENAME COLUMN `client_secret` TO `clientSecret`;--> statement-breakpoint | ||
ALTER TABLE `carts` RENAME COLUMN `created_at` TO `createdAt`;--> statement-breakpoint | ||
ALTER TABLE `carts` RENAME COLUMN `updated_at` TO `updatedAt`;--> statement-breakpoint | ||
ALTER TABLE `email_preferences` RENAME COLUMN `created_at` TO `createdAt`;--> statement-breakpoint | ||
ALTER TABLE `email_preferences` RENAME COLUMN `updated_at` TO `updatedAt`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `store_id` TO `storeId`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `stripe_payment_intent_id` TO `stripePaymentIntentId`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `stripe_payment_intent_status` TO `stripePaymentIntentStatus`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `address_id` TO `addressId`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `created_at` TO `createdAt`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `updated_at` TO `updatedAt`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `store_id` TO `storeId`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `stripe_account_id` TO `stripeAccountId`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `stripe_account_created_at` TO `stripeAccountCreatedAt`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `stripe_account_expires_at` TO `stripeAccountExpiresAt`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `details_submitted` TO `detailsSubmitted`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `created_at` TO `createdAt`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `updated_at` TO `updatedAt`;--> statement-breakpoint | ||
ALTER TABLE `products` RENAME COLUMN `created_at` TO `createdAt`;--> statement-breakpoint | ||
ALTER TABLE `products` RENAME COLUMN `updated_at` TO `updatedAt`;--> statement-breakpoint | ||
ALTER TABLE `stores` RENAME COLUMN `user_id` TO `userId`;--> statement-breakpoint | ||
ALTER TABLE `stores` RENAME COLUMN `stripe_account_id` TO `stripeAccountId`;--> statement-breakpoint | ||
ALTER TABLE `stores` RENAME COLUMN `created_at` TO `createdAt`;--> statement-breakpoint | ||
ALTER TABLE `stores` RENAME COLUMN `updated_at` TO `updatedAt`;--> statement-breakpoint | ||
ALTER TABLE `addresses` MODIFY COLUMN `createdAt` timestamp DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `carts` MODIFY COLUMN `createdAt` timestamp DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `email_preferences` MODIFY COLUMN `createdAt` timestamp DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `orders` MODIFY COLUMN `createdAt` timestamp DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `payments` MODIFY COLUMN `createdAt` timestamp DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `products` MODIFY COLUMN `createdAt` timestamp DEFAULT (now()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
ALTER TABLE `addresses` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `addresses` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `carts` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `carts` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `email_preferences` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `email_preferences` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `products` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `products` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `stores` RENAME COLUMN `createdAt` TO `created_at`;--> statement-breakpoint | ||
ALTER TABLE `stores` RENAME COLUMN `updatedAt` TO `updated_at`;--> statement-breakpoint | ||
ALTER TABLE `addresses` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `carts` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `email_preferences` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `orders` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `payments` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now());--> statement-breakpoint | ||
ALTER TABLE `products` MODIFY COLUMN `created_at` timestamp NOT NULL DEFAULT (now()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ALTER TABLE `stores` RENAME COLUMN `userId` TO `user_id`;--> statement-breakpoint | ||
ALTER TABLE `stores` RENAME COLUMN `stripeAccountId` TO `stripe_account_id`;--> statement-breakpoint | ||
ALTER TABLE `stores` ADD CONSTRAINT `stores_user_id_unique` UNIQUE(`user_id`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `stores` DROP INDEX `stores_user_id_unique`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ALTER TABLE `carts` RENAME COLUMN `paymentIntentId` TO `payment_intent_id`;--> statement-breakpoint | ||
ALTER TABLE `carts` RENAME COLUMN `clientSecret` TO `client_secret`;--> statement-breakpoint | ||
ALTER TABLE `products` RENAME COLUMN `storeId` TO `store_id`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE `addresses` RENAME COLUMN `postalCode` TO `postal_code`;--> statement-breakpoint | ||
ALTER TABLE `email_preferences` RENAME COLUMN `userId` TO `user_id`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ALTER TABLE `payments` RENAME COLUMN `stripeAccountId` TO `stripe_account_id`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `stripeAccountCreatedAt` TO `stripe_account_created_at`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `stripeAccountExpiresAt` TO `stripe_account_expires_at`;--> statement-breakpoint | ||
ALTER TABLE `payments` RENAME COLUMN `detailsSubmitted` TO `details_submitted`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ALTER TABLE `orders` RENAME COLUMN `storeId` TO `store_id`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `stripePaymentIntentId` TO `stripe_payment_intent_id`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `stripePaymentIntentStatus` TO `stripe_payment_intent_status`;--> statement-breakpoint | ||
ALTER TABLE `orders` RENAME COLUMN `addressId` TO `address_id`; |
Oops, something went wrong.