Works on products variants
This commit is contained in:
parent
d5140d5121
commit
72e78e95cc
Binary file not shown.
@ -38,6 +38,38 @@ create table llx_product_variant_lang
|
|||||||
ALTER TABLE llx_product_variant_lang ADD UNIQUE INDEX uk_product_variant_lang (fk_product_variant, lang);
|
ALTER TABLE llx_product_variant_lang ADD UNIQUE INDEX uk_product_variant_lang (fk_product_variant, lang);
|
||||||
ALTER TABLE llx_product_variant_lang ADD CONSTRAINT fk_product_variant_lang_fk_product_variant FOREIGN KEY (fk_product_variant) REFERENCES llx_product_variant (rowid);
|
ALTER TABLE llx_product_variant_lang ADD CONSTRAINT fk_product_variant_lang_fk_product_variant FOREIGN KEY (fk_product_variant) REFERENCES llx_product_variant (rowid);
|
||||||
|
|
||||||
|
create table llx_product_variant_values
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
tms timestamp,
|
||||||
|
fk_product_variant integer NOT NULL,
|
||||||
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
|
rang integer DEFAULT 0
|
||||||
|
)type=innodb;
|
||||||
|
|
||||||
|
ALTER TABLE llx_product_variant_values ADD UNIQUE INDEX idx_product_variant_values_fk_product_variant (fk_product_variant);
|
||||||
|
ALTER TABLE llx_product_variant_values ADD CONSTRAINT fk_product_variant_values_fk_product_variant FOREIGN KEY (fk_product_variant) REFERENCES llx_product_variant (rowid);
|
||||||
|
|
||||||
|
create table llx_product_variant_values_lang
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
fk_product_variant_values integer DEFAULT 0 NOT NULL,
|
||||||
|
lang varchar(5) NOT NULL,
|
||||||
|
label varchar(64) NOT NULL
|
||||||
|
)type=innodb;
|
||||||
|
|
||||||
|
ALTER TABLE llx_product_variant_values_lang ADD UNIQUE INDEX uk_product_variant_values_lang (fk_product_variant_values, lang);
|
||||||
|
ALTER TABLE llx_product_variant_values_lang ADD CONSTRAINT fk_product_variant_values_lang_fk_product_variant_values FOREIGN KEY (fk_product_variant_values) REFERENCES llx_product_variant_values (rowid);
|
||||||
|
|
||||||
|
create table llx_product_variant_combination
|
||||||
|
(
|
||||||
|
fk_product integer PRIMARY KEY,
|
||||||
|
fk_product_variant_values integer DEFAULT 0 NOT NULL
|
||||||
|
)type=innodb;
|
||||||
|
|
||||||
|
ALTER TABLE llx_product_variant_combination ADD INDEX idx_product_variant_values_fk_product (fk_product, fk_product_variant_values);
|
||||||
|
ALTER TABLE llx_product_variant_combination ADD CONSTRAINT fk_product_variant_combination_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
|
||||||
|
ALTER TABLE llx_product_variant_combination ADD CONSTRAINT fk_product_variant_combination_fk_product_variant_values FOREIGN KEY (fk_product_variant_values) REFERENCES llx_product_variant_values (rowid);
|
||||||
|
|
||||||
alter table llx_societe add column default_lang varchar(6) after price_level;
|
alter table llx_societe add column default_lang varchar(6) after price_level;
|
||||||
alter table llx_socpeople add column default_lang varchar(6) after note;
|
alter table llx_socpeople add column default_lang varchar(6) after note;
|
||||||
|
|||||||
@ -0,0 +1,26 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_product_variant_combination ADD INDEX idx_product_variant_values_fk_product (fk_product, fk_product_variant_values);
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_product_variant_combination ADD CONSTRAINT fk_product_variant_combination_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
|
||||||
|
ALTER TABLE llx_product_variant_combination ADD CONSTRAINT fk_product_variant_combination_fk_product_variant_values FOREIGN KEY (fk_product_variant_values) REFERENCES llx_product_variant_values (rowid);
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
create table llx_product_variant_combination
|
||||||
|
(
|
||||||
|
fk_product integer PRIMARY KEY,
|
||||||
|
fk_product_variant_values integer DEFAULT 0 NOT NULL
|
||||||
|
)type=innodb;
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_product_variant_values ADD UNIQUE INDEX idx_product_variant_values_fk_product_variant (fk_product_variant);
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_product_variant_values ADD CONSTRAINT fk_product_variant_values_fk_product_variant FOREIGN KEY (fk_product_variant) REFERENCES llx_product_variant (rowid);
|
||||||
28
htdocs/install/mysql/tables/llx_product_variant_values.sql
Normal file
28
htdocs/install/mysql/tables/llx_product_variant_values.sql
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
create table llx_product_variant_values
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
tms timestamp,
|
||||||
|
fk_product_variant integer NOT NULL,
|
||||||
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
|
rang integer DEFAULT 0
|
||||||
|
)type=innodb;
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_product_variant_values_lang ADD UNIQUE INDEX uk_product_variant_values_lang (fk_product_variant_values, lang);
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_product_variant_values_lang ADD CONSTRAINT fk_product_variant_values_lang_fk_product_variant_values FOREIGN KEY (fk_product_variant_values) REFERENCES llx_product_variant_values (rowid);
|
||||||
|
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
create table llx_product_variant_values_lang
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
fk_product_variant_values integer DEFAULT 0 NOT NULL,
|
||||||
|
lang varchar(5) NOT NULL,
|
||||||
|
label varchar(64) NOT NULL
|
||||||
|
)type=innodb;
|
||||||
Loading…
Reference in New Issue
Block a user