Skip to content

Commit

Permalink
more sql-migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyasnikov committed Jan 8, 2025
1 parent 5444c1e commit 8d20ea1
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
DROP TABLE `test/cities`;

ALTER TABLE `test/users`
DROP COLUMN city;
ALTER TABLE `test/users` DROP COLUMN city;
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ CREATE TABLE `test/cities` (
PRIMARY KEY (id)
);

ALTER TABLE `test/users`
ADD COLUMN city Uint64;
ALTER TABLE `test/users` ADD COLUMN city Uint64;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `test/users` DROP INDEX `users_email_index`;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `test/users` ADD INDEX `users_email_index` GLOBAL UNIQUE ON (`email`);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE `test/books`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE TABLE `test/books` (
user_id Uint64,
name Text,
author Text,
PRIMARY KEY (user_id)
);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE `test/movies`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE TABLE `test/movies` (
user_id Uint64,
name Text,
director Text,
PRIMARY KEY (user_id)
);

0 comments on commit 8d20ea1

Please sign in to comment.