Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema update #91

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dirs/ecommerce/migrations/20240910131040.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Drop "posts" table
DROP TABLE `posts`;

Check failure on line 2 in dirs/ecommerce/migrations/20240910131040.sql

View workflow job for this annotation

GitHub Actions / atlas

destructive changes detected

Dropping table "posts" (DS102) Details: https://atlasgo.io/lint/analyzers#DS102
3 changes: 2 additions & 1 deletion dirs/ecommerce/migrations/atlas.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
h1:55qUC1rpNkBuvU+91gLBMyG7VZXdXEn8DgVLkEbYkfM=
h1:4sqIaHYHb8OownAoKW5FV5jS7H/eyb14yMK3cH9U3sU=
20230316085611.sql h1:br6W6LPEnnsejlz/7hRm9zthwStCzjN2vZkqVPxlmvo=
20230316090502.sql h1:GfeRjkSeoCt3JVRtLQNa/r50lRfpAPXS7AqTU2ZNFgY=
20230531091333_products_categories.sql h1:59q2M59dV5dJNv4Lyb2TAJz8V6HekgkLn9z4DoL98jA=
Expand Down Expand Up @@ -44,3 +44,4 @@ h1:55qUC1rpNkBuvU+91gLBMyG7VZXdXEn8DgVLkEbYkfM=
20240829131016.sql h1:0zYZTAkT2bM3KovKz9e3KrmSKjwqM7qbkIHK1Yybh2c=
20240901130920.sql h1:Dq3nUz8IibffiSag7Lw7UZjTM0Dj8EZssyn5mUSqX84=
20240903131010.sql h1:GGqMn45ltGFdUkBkGu+Z1BK582+Cb3jPSv0PtZDyg80=
20240910131040.sql h1:XP5zaF4ac+sQLMZ24tAxQhA2uDttr5P8/gYS76eNVUc=
13 changes: 1 addition & 12 deletions dirs/ecommerce/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,6 @@ CONSTRAINT `order_items_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `orders` (`i
CONSTRAINT `order_items_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON UPDATE NO ACTION ON DELETE CASCADE
) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci;

-- Create 'posts' table
CREATE TABLE `posts` (
`id` int NOT NULL,
`user_id` int NOT NULL,
`title` varchar(255) NOT NULL,
`body` text NOT NULL,
PRIMARY KEY (`id`),
INDEX `user_id` (`user_id`),
CONSTRAINT `posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION ON DELETE CASCADE
) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci;

-- Create 'payment_methods' table
CREATE TABLE `payment_methods` (
`id` int NOT NULL,
Expand All @@ -140,4 +129,4 @@ CREATE TABLE `payment_methods` (
PRIMARY KEY (`id`),
INDEX `user_id` (`user_id`),
CONSTRAINT `payment_methods_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION ON DELETE CASCADE
) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
Loading