diff --git a/pgsql/tables/llx_categorie.sql b/pgsql/tables/llx_categorie.sql new file mode 100644 index 00000000000..ee3645a7643 --- /dev/null +++ b/pgsql/tables/llx_categorie.sql @@ -0,0 +1,33 @@ +-- Generated from dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Brice Davoleau +-- Copyright (C) 2005 Matthieu Valleton +-- +-- 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$ +-- $Source$ +-- +-- ============================================================================ + +create table llx_categorie +( + rowid SERIAL PRIMARY KEY, + "label" VARCHAR(255), + "description" text +); diff --git a/pgsql/tables/llx_categorie_association.key.sql b/pgsql/tables/llx_categorie_association.key.sql new file mode 100644 index 00000000000..af2922e38d5 --- /dev/null +++ b/pgsql/tables/llx_categorie_association.key.sql @@ -0,0 +1,29 @@ +-- Generated from dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Brice Davoleau +-- Copyright (C) 2005 Matthieu Valleton +-- +-- 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. +-- +-- ============================================================================ + +ALTER TABLE llx_categorie_association ADD INDEX (fk_categorie_mere); +ALTER TABLE llx_categorie_association ADD INDEX (fk_categorie_fille); + +ALTER TABLE llx_categorie_association ADD FOREIGN KEY (fk_categorie_mere) REFERENCES llx_categorie (rowid); +ALTER TABLE llx_categorie_association ADD FOREIGN KEY (fk_categorie_fille) REFERENCES llx_categorie (rowid); diff --git a/pgsql/tables/llx_categorie_association.sql b/pgsql/tables/llx_categorie_association.sql new file mode 100644 index 00000000000..5c562ec3479 --- /dev/null +++ b/pgsql/tables/llx_categorie_association.sql @@ -0,0 +1,29 @@ +-- Generated from dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Brice Davoleau +-- Copyright (C) 2005 Matthieu Valleton +-- +-- 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. +-- +-- ============================================================================ + +create table llx_categorie_association +( + "fk_categorie_mere" integer NOT NULL, + "fk_categorie_fille" integer NOT NULL +); diff --git a/pgsql/tables/llx_categorie_product.key.sql b/pgsql/tables/llx_categorie_product.key.sql new file mode 100644 index 00000000000..afb19e5a855 --- /dev/null +++ b/pgsql/tables/llx_categorie_product.key.sql @@ -0,0 +1,31 @@ +-- Generated from dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Brice Davoleau +-- Copyright (C) 2005 Matthieu Valleton +-- +-- 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. +-- +-- ============================================================================ + +ALTER TABLE llx_categorie_product ADD INDEX (fk_categorie); +ALTER TABLE llx_categorie_product ADD INDEX (fk_product); + +ALTER TABLE llx_categorie_product ADD FOREIGN KEY (fk_categorie) + REFERENCES llx_categorie (rowid); +ALTER TABLE llx_categorie_product ADD FOREIGN KEY (fk_product) + REFERENCES llx_product (rowid); diff --git a/pgsql/tables/llx_categorie_product.sql b/pgsql/tables/llx_categorie_product.sql new file mode 100644 index 00000000000..43dc5f8e27c --- /dev/null +++ b/pgsql/tables/llx_categorie_product.sql @@ -0,0 +1,29 @@ +-- Generated from dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Brice Davoleau +-- Copyright (C) 2005 Matthieu Valleton +-- +-- 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. +-- +-- ============================================================================ + +create table llx_categorie_product +( + "fk_categorie" integer NOT NULL, + "fk_product" integer NOT NULL +); diff --git a/pgsql/tables/llx_product_fournisseur_price_log.sql b/pgsql/tables/llx_product_fournisseur_price_log.sql new file mode 100644 index 00000000000..990067e533b --- /dev/null +++ b/pgsql/tables/llx_product_fournisseur_price_log.sql @@ -0,0 +1,37 @@ +-- Generated from dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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$ +-- $Source$ +-- +-- ============================================================================ + + +create table llx_product_fournisseur_price_log +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "fk_product" integer, + "fk_soc" integer, -- lien sur llx_societe + "price" real, + "quantity" real, + "fk_user" integer +);