This commit is contained in:
llopis15 2021-03-12 12:53:52 +01:00
parent d617786e37
commit fd80637eb3
1 changed files with 11 additions and 0 deletions

11
db/create.js Normal file
View File

@ -0,0 +1,11 @@
const con = require('./connect.js')
con.con.connect(function(err) {
if (err) throw err;
console.log("Connected!");
var sql = "CREATE TABLE customers (code VARCHAR(100) PRIMARY KEY, shelvingFk VARCHAR(10) FOREIGN KEY REFERENCES shelving(code), level INT(11))";
con.con.query(sql, function (err, result) {
if (err) throw err;
console.log("Table created");
});
});