-
Notifications
You must be signed in to change notification settings - Fork 0
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
4 changed files
with
78 additions
and
6 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
16 changes: 16 additions & 0 deletions
16
projects/estore/inventory/migrations/20240307104354_add_warehouses.sql
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,16 @@ | ||
-- Create "regions" table | ||
CREATE TABLE `regions` ( | ||
`region_id` int NOT NULL AUTO_INCREMENT, | ||
`name` varchar(255) NOT NULL, | ||
PRIMARY KEY (`region_id`) | ||
) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci; | ||
-- Create "warehouses" table | ||
CREATE TABLE `warehouses` ( | ||
`warehouse_id` int NOT NULL AUTO_INCREMENT, | ||
`name` varchar(255) NOT NULL, | ||
`address` text NOT NULL, | ||
`region_id` int NULL, | ||
PRIMARY KEY (`warehouse_id`), | ||
INDEX `region_id` (`region_id`), | ||
CONSTRAINT `warehouses_ibfk_1` FOREIGN KEY (`region_id`) REFERENCES `regions` (`region_id`) ON UPDATE NO ACTION ON DELETE NO ACTION | ||
) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci; |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
h1:fo2R2MvvR2SDqpcg3lMGjPvOwppIJ3AIR7rtGh5zPpU= | ||
h1:OD80uv7vCyCGr2x6dS4rLVaCkoj7JyydbcT6gxQAShI= | ||
20240307092728.sql h1:BEXRAbglZQlUqXHRy4fvsEVsu7FlSfKcJ/JAkH2XgMY= | ||
20240307104354_add_warehouses.sql h1:heT56DSu6Ka8TJo8K4F92rVxinZmt+7tbMX+y3vaJKo= |
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