diff --git a/domain/schema/model.go b/domain/schema/model.go index cc1980a991b..5e181264fd1 100644 --- a/domain/schema/model.go +++ b/domain/schema/model.go @@ -116,7 +116,7 @@ CREATE TABLE subnet ( vlan_tag INT, is_public BOOLEAN, space_uuid TEXT, - subnet_type_id TEXT, + subnet_type_id INT, CONSTRAINT fk_subnets_spaces FOREIGN KEY (space_uuid) REFERENCES space(uuid), @@ -126,7 +126,7 @@ CREATE TABLE subnet ( ); CREATE TABLE subnet_type ( - id TEXT PRIMARY KEY, + id INT PRIMARY KEY, name TEXT NOT NULL, is_usable BOOLEAN, is_space_settable BOOLEAN @@ -138,7 +138,7 @@ INSERT INTO subnet_type VALUES (2, 'fan_overlay_segment', true, true); CREATE TABLE subnet_association_type ( - id TEXT PRIMARY KEY, + id INT PRIMARY KEY, name TEXT NOT NULL ); @@ -146,9 +146,9 @@ INSERT INTO subnet_association_type VALUES (0, 'overlay_of'); -- The subnet is an overlay of other (an underlay) subnet. CREATE TABLE subnet_type_association_type ( - subject_subnet_type_id TEXT PRIMARY KEY, - associated_subnet_type_id TEXT NOT NULL, - association_type_id TEXT NOT NULL, + subject_subnet_type_id INT PRIMARY KEY, + associated_subnet_type_id INT NOT NULL, + association_type_id INT NOT NULL, CONSTRAINT fk_subject_subnet_type_id FOREIGN KEY (subject_subnet_type_id) REFERENCES subnet_type(id), @@ -166,7 +166,7 @@ INSERT INTO subnet_type_association_type VALUES CREATE TABLE subnet_association ( subject_subnet_uuid TEXT PRIMARY KEY, associated_subnet_uuid TEXT NOT NULL, - association_type_id TEXT NOT NULL, + association_type_id INT NOT NULL, CONSTRAINT fk_subject_subnet_uuid FOREIGN KEY (subject_subnet_uuid) REFERENCES subnet(uuid),