mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-11 08:43:59 +03:00
Split apart DB init queries in tests
refs https://github.com/TryGhost/Toolbox/issues/213 - `better-sqlite3` doesn't like multiple queries in the same statement so we can make the change here to split them up ahead of the switch
This commit is contained in:
parent
65fa8c12b5
commit
32e2d15880
@ -193,8 +193,8 @@ async function setupDb() {
|
||||
\`updated_by\` varchar(24) null,
|
||||
primary key (\`id\`)
|
||||
);
|
||||
CREATE UNIQUE INDEX \`permissions_name_unique\` on \`permissions\` (\`name\`);\`);
|
||||
`);
|
||||
await knex.raw(`CREATE UNIQUE INDEX \`permissions_name_unique\` on \`permissions\` (\`name\`);`);
|
||||
|
||||
await knex.raw(`
|
||||
CREATE TABLE \`permissions_roles\` (
|
||||
@ -216,8 +216,8 @@ async function setupDb() {
|
||||
\`updated_by\` varchar(24) null,
|
||||
primary key (\`id\`)
|
||||
);
|
||||
CREATE UNIQUE INDEX \`roles_name_unique\` on \`roles\` (\`name\`);
|
||||
`);
|
||||
await knex.raw(`CREATE UNIQUE INDEX \`roles_name_unique\` on \`roles\` (\`name\`);`);
|
||||
|
||||
const date = knex.raw('CURRENT_TIMESTAMP');
|
||||
await knex('roles').insert({
|
||||
|
Loading…
Reference in New Issue
Block a user