Skip to content

Commit

Permalink
Remove CHECK constraint from building_level column in building table
Browse files Browse the repository at this point in the history
  • Loading branch information
Vianpyro committed Nov 12, 2024
1 parent 47c60f9 commit 84f595a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ CREATE TABLE IF NOT EXISTS city (
CREATE TABLE IF NOT EXISTS building (
building_id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
building_name VARCHAR(100),
building_level INT DEFAULT 0 NOT NULL CHECK (building_level < = max_level),
building_level INT DEFAULT 0 NOT NULL,
max_level INT DEFAULT 10 NOT NULL,
city_id INT UNSIGNED NOT NULL,
FOREIGN KEY (city_id) REFERENCES city (city_id)
Expand Down

0 comments on commit 84f595a

Please sign in to comment.