mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05: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
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue