Enable FK's, duh
This commit is contained in:
parent
3bbdd4abae
commit
03ee20783b
|
@ -97,6 +97,9 @@ function initializeDatabases(cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function createSystemTables() {
|
function createSystemTables() {
|
||||||
|
|
||||||
|
dbs.system.run('PRAGMA foreign_keys = ON;');
|
||||||
|
|
||||||
dbs.system.run(
|
dbs.system.run(
|
||||||
'CREATE TABLE IF NOT EXISTS system_property (' +
|
'CREATE TABLE IF NOT EXISTS system_property (' +
|
||||||
' prop_name VARCHAR PRIMARY KEY NOT NULL,' +
|
' prop_name VARCHAR PRIMARY KEY NOT NULL,' +
|
||||||
|
@ -120,6 +123,8 @@ function createSystemTables() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function createUserTables() {
|
function createUserTables() {
|
||||||
|
dbs.user.run('PRAGMA foreign_keys = ON;');
|
||||||
|
|
||||||
dbs.user.run(
|
dbs.user.run(
|
||||||
`CREATE TABLE IF NOT EXISTS user (
|
`CREATE TABLE IF NOT EXISTS user (
|
||||||
id INTEGER PRIMARY KEY,
|
id INTEGER PRIMARY KEY,
|
||||||
|
@ -158,6 +163,9 @@ function createUserTables() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function createMessageBaseTables() {
|
function createMessageBaseTables() {
|
||||||
|
|
||||||
|
dbs.message.run('PRAGMA foreign_keys = ON;');
|
||||||
|
|
||||||
dbs.message.run(
|
dbs.message.run(
|
||||||
`CREATE TABLE IF NOT EXISTS message (
|
`CREATE TABLE IF NOT EXISTS message (
|
||||||
message_id INTEGER PRIMARY KEY,
|
message_id INTEGER PRIMARY KEY,
|
||||||
|
|
Loading…
Reference in New Issue