Added test base for postgres
This commit is contained in:
@@ -23,7 +23,7 @@ const createDB = async (mappedPort): Promise<Knex> => {
|
||||
await initialDb.destroy();
|
||||
|
||||
const db = createKnexDb(mappedPort, 'photowalltest');
|
||||
const sql = fs.readFileSync(resolve(__dirname, 'seed.sql')).toString();
|
||||
const sql = fs.readFileSync(resolve(__dirname, 'schema.sql')).toString();
|
||||
await db.raw(sql);
|
||||
return db;
|
||||
};
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public;
|
||||
CREATE TABLE locales (
|
||||
id integer NOT NULL,
|
||||
id SERIAL NOT NULL,
|
||||
value character(5),
|
||||
esales_locale character varying NOT NULL,
|
||||
fallback_id integer,
|
||||
name text NOT NULL
|
||||
);
|
||||
CREATE TABLE markets (
|
||||
id integer NOT NULL,
|
||||
id SERIAL NOT NULL,
|
||||
name character varying,
|
||||
locale_id integer
|
||||
);
|
||||
CREATE TABLE market_locales (
|
||||
id integer NOT NULL,
|
||||
id SERIAL NOT NULL,
|
||||
market_id integer NOT NULL,
|
||||
locale_id integer NOT NULL,
|
||||
name text NOT NULL
|
||||
Reference in New Issue
Block a user