Add Tags table in flyway migration
This commit is contained in:
parent
25ef4d7197
commit
70412f27c5
9
api/resources/db/migration/V3__Create_tag_table.sql
Normal file
9
api/resources/db/migration/V3__Create_tag_table.sql
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
CREATE TABLE `Tags`
|
||||||
|
(
|
||||||
|
`id` int PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
`name` varchar(50) NOT NULL,
|
||||||
|
`note_id` int NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE `Tags`
|
||||||
|
ADD FOREIGN KEY (`note_id`) REFERENCES `Notes` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
|
||||||
Loading…
x
Reference in New Issue
Block a user