update utf8

This commit is contained in:
llopis15 2021-05-10 16:44:14 +02:00
parent ac129ad035
commit 5b23932518
2 changed files with 14 additions and 12 deletions

View File

@ -3,10 +3,11 @@ const con = require('./connect.js');
con.con.connect(function(err) {
if (err) throw err;
let sql = `CREATE TABLE vn.smartTag (
code varchar(100) NOT NULL,
code varchar(12) NOT NULL,
shelvingFk varchar(10) NULL,
\`level\` int(11) NULL,
CONSTRAINT \`PRIMARY\` PRIMARY KEY (code),
level int(11) NULL,
ticketFk int(20),
CONSTRAINT PRIMARY PRIMARY KEY (code),
CONSTRAINT smartTag_FK FOREIGN KEY (shelvingFk) REFERENCES vn.shelving(code)
)
ENGINE=InnoDB

View File

@ -1,13 +1,14 @@
CREATE TABLE vn.smartTag (
code varchar(12) NOT NULL,
shelvingFk varchar(10) NULL,
`level` int(11) NULL,
CONSTRAINT `PRIMARY` PRIMARY KEY (code),
CONSTRAINT smartTag_FK FOREIGN KEY (shelvingFk) REFERENCES vn.shelving(code)
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8
COLLATE=utf8_general_ci;
code varchar(12) NOT NULL COLLATE utf8_general_ci,
shelvingFk varchar(10) NULL,
`level` int(11) NULL,
ticketFk int(20),
CONSTRAINT `PRIMARY` PRIMARY KEY (code),
CONSTRAINT smartTag_FK FOREIGN KEY (shelvingFk) REFERENCES vn.shelving(code)
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8
COLLATE=utf8_unicode_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);