Added test base for postgres

This commit is contained in:
Niklas Fondberg
2021-04-29 14:37:48 +02:00
parent bf01ecba9c
commit b9b6abbec5
3 changed files with 48 additions and 46 deletions
+44 -42
View File
@@ -82,8 +82,10 @@
}
{
order(id: 588274) {
order(id: 579702) {
id
localeName
marketName
market {
id
name
@@ -91,53 +93,53 @@
currency
priceAdjustment
}
deliveryInformation {
address {
recipientName
companyname
address1
address2
city
countryCode
stateCountyOrRegion
zipcode
}
email
phone
}
billingInformation {
address {
recipientName
companyname
address1
address2
city
countryCode
stateCountyOrRegion
zipcode
}
email
phone
}
rows {
id
order {
id
}
inserted
orderId
productId
productGroup
artNo
path
name
price
designerId
code
commission
commissionAmount
status
pwintyImageId
commissionResale
designer
designerId
designerPath
discountType
discountValue
displayHeight
displayWidth
edge
frameColor
framed
group
height
imagedonotprint
imageprocessed
imageprocessingrejected
inserted
material
measureUnit
mirrored
modifier
name
noShipping
orderId
path
price
printId
process
productGroup
productId
pwintyImageId
pwintySku
resolution
status
type
vat
weight
width
x
y
}
}
}
+1 -1
View File
@@ -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