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 6, 2025
1 parent 5444c1e commit 11f2a26
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 2 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
@@ -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 11f2a26

Please sign in to comment.