Merge pull request #165 from Photowall/4194-drop-product-types-table
Remove product-type
This commit is contained in:
@@ -93,3 +93,4 @@ jspm_packages
|
|||||||
.vscode/
|
.vscode/
|
||||||
.env
|
.env
|
||||||
src/__test__/export
|
src/__test__/export
|
||||||
|
docker-compose.yml
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ version: '3.8'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
api:
|
api:
|
||||||
|
restart: always
|
||||||
build:
|
build:
|
||||||
context: ./
|
context: ./
|
||||||
dockerfile: ./Dockerfile-dev
|
dockerfile: ./Dockerfile-dev
|
||||||
@@ -65,8 +65,6 @@ export const dbConfig = {
|
|||||||
return 'product-stockprices';
|
return 'product-stockprices';
|
||||||
case 'product_stockproducts':
|
case 'product_stockproducts':
|
||||||
return 'product-stockproducts';
|
return 'product-stockproducts';
|
||||||
case 'product_types':
|
|
||||||
return 'product-types';
|
|
||||||
case 'stock_items':
|
case 'stock_items':
|
||||||
return 'stock-items';
|
return 'stock-items';
|
||||||
case 'stock_items_data':
|
case 'stock_items_data':
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import {
|
|||||||
ProductInfoInput,
|
ProductInfoInput,
|
||||||
ProductBlacklistMarketInput,
|
ProductBlacklistMarketInput,
|
||||||
ProductMaterials,
|
ProductMaterials,
|
||||||
ProductSizeTypes,
|
|
||||||
ProductProportionsInput,
|
ProductProportionsInput,
|
||||||
Batch,
|
Batch,
|
||||||
Copyright,
|
Copyright,
|
||||||
@@ -806,17 +805,10 @@ export class ProductAPI extends BaseSQLDataSource {
|
|||||||
if (shouldAdd.length > 0) {
|
if (shouldAdd.length > 0) {
|
||||||
const insertionProducts = [];
|
const insertionProducts = [];
|
||||||
// Insert in product-printproducts
|
// Insert in product-printproducts
|
||||||
// TODO: Depracate typeid, its not used to check repeating
|
const insertQuery = `INSERT INTO "product-printproducts" (productid, groupid) VALUES (?, ?)`;
|
||||||
const insertQuery = `INSERT INTO "product-printproducts" (productid, groupid, typeid) VALUES (?, ?, ?)`;
|
|
||||||
shouldAdd.forEach((groupId) => {
|
shouldAdd.forEach((groupId) => {
|
||||||
insertionProducts.push(
|
insertionProducts.push(
|
||||||
this.knex.raw(insertQuery, [
|
this.knex.raw(insertQuery, [productId, groupId]),
|
||||||
productId,
|
|
||||||
groupId,
|
|
||||||
groupId === ProductGroup.WALLPAPER
|
|
||||||
? ProductSizeTypes.TILING
|
|
||||||
: ProductSizeTypes.SCALING,
|
|
||||||
]),
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -84,12 +84,6 @@ export enum ProductMaterials {
|
|||||||
PREMIUM_FRAMED_PRINT = 6,
|
PREMIUM_FRAMED_PRINT = 6,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ProductSizeTypes {
|
|
||||||
SCALING = 1,
|
|
||||||
FIXED = 2,
|
|
||||||
TILING = 3,
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum ProductType {
|
export enum ProductType {
|
||||||
UNKNOWN = 0,
|
UNKNOWN = 0,
|
||||||
PHOTO = 1,
|
PHOTO = 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user