update create table

This commit is contained in:
llopis15 2021-03-17 16:02:05 +01:00
parent 4b4770b037
commit a2bedb372a
1 changed files with 5 additions and 5 deletions

View File

@ -2,12 +2,12 @@ CREATE TABLE vn.smartTag (
code varchar(100) NOT NULL,
shelvingFk varchar(10) NULL,
`level` int(11) NULL,
CONSTRAINT `PRIMARY` PRIMARY KEY (code)
CONSTRAINT `PRIMARY` PRIMARY KEY (code),
CONSTRAINT smartTag_FK FOREIGN KEY (shelvingFk) REFERENCES vn.shelving(code)
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8
COLLATE=utf8_unicode_ci;
COLLATE=utf8_general_ci;
ALTER TABLE vn.smartTag MODIFY COLUMN shelvingFk varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL NULL;
ALTER TABLE vn.smartTag ADD CONSTRAINT smartTag_FK FOREIGN KEY (shelvingFk) REFERENCES vn.shelving(code);
--ALTER TABLE vn.smartTag MODIFY COLUMN shelvingFk varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL NULL;
--ALTER TABLE vn.smartTag ADD CONSTRAINT smartTag_FK FOREIGN KEY (shelvingFk) REFERENCES vn.shelving(code);