forked from Wavyzz/dolibarr
New: Ajout script qui met a jour tous les sql de postgres partir des sql de mysql.
This commit is contained in:
281
build/dolibarr_mysql2pgsql.pl
Normal file
281
build/dolibarr_mysql2pgsql.pl
Normal file
@@ -0,0 +1,281 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Ce script est une version modifi<66>e de mysql2pgsql afin de:
|
||||||
|
# - g<>rer les base mysql innodb
|
||||||
|
# - traiter tous les fichiers ../mysq/data/*.sql vers ./pgsql/data
|
||||||
|
# - g<>rer les autoincrement en SERIAL plutot qu'en s<>quenceurs
|
||||||
|
# - utiliser le CHECK plutot que des sous-tables pour les types enum
|
||||||
|
# - corriger de nombreux bugs
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
use Data::Dumper;
|
||||||
|
use Getopt::Long;
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
use vars qw/ $DIR $PROG $Extension $SOURCE $DESTI %filelist /;
|
||||||
|
|
||||||
|
# command line options
|
||||||
|
my( $opt_debug, $opt_help);
|
||||||
|
# general values
|
||||||
|
my ($out, $size);
|
||||||
|
# variables for constructing pre-create-table entities
|
||||||
|
my $create_sql=''; # if empty we are not making a create statement
|
||||||
|
my $create_index=''; # if empty we are not making a create statement
|
||||||
|
my %enum_datafield=(); # holds enumeration choices
|
||||||
|
my (@column_values,$enum_column, $seq);
|
||||||
|
my $table="";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# MAIN
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
($DIR=$0) =~ s/([^\/\\]+)$//; ($PROG=$1) =~ s/\.([^\.]*)$//; $Extension=$1;
|
||||||
|
$DIR||='.'; $DIR =~ s/([^\/\\])[\\\/]+$/$1/;
|
||||||
|
|
||||||
|
$SOURCE="$DIR/../mysql/tables";
|
||||||
|
$DESTI="$DIR/../pgsql/tables";
|
||||||
|
|
||||||
|
# Recherche tous les fichiers .sql
|
||||||
|
opendir(DIR, $SOURCE);
|
||||||
|
foreach my $file (readdir(DIR)) {
|
||||||
|
if ($file =~ /\.sql$/ && -f "$SOURCE/$file") {
|
||||||
|
print "Found file $file\n";
|
||||||
|
$filelist{$file}=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir(DIR);
|
||||||
|
|
||||||
|
|
||||||
|
# Boucle sur tous les fichiers de SOURCE
|
||||||
|
#---------------------------------------
|
||||||
|
foreach my $file (keys %filelist) {
|
||||||
|
|
||||||
|
$ARGV[0]="$SOURCE/$file";
|
||||||
|
$ARGV[1]="$DESTI/$file";
|
||||||
|
|
||||||
|
print "Convert file $ARGV[0] into $ARGV[1]\n";
|
||||||
|
|
||||||
|
# MySQL to PostgreSQL dump file converter
|
||||||
|
#
|
||||||
|
# For usage: perl mysql2pgsql.perl --help
|
||||||
|
#
|
||||||
|
# homepage: http://www.rot13.org/~dpavlin/projects.html
|
||||||
|
# 1999-12-15 DbP -- Dobrica Pavlinusic <dpavlin@rot13.org>
|
||||||
|
# 1999-12-26 DbP don't make serial from auto_increment, create all manually
|
||||||
|
# (to set start value right)
|
||||||
|
# 2000-01-11 DbP now creates sequences with correct value
|
||||||
|
# 2000-04-25 DbP import into CVS (at cvs.linux.hr)
|
||||||
|
# 2001-01-29 tpo -- Tomas Pospisek <tpo@sourcepole.ch>:
|
||||||
|
# 1) make script comply to usage:
|
||||||
|
# 2) make script output to STDOUT instead of STERR
|
||||||
|
# 3) change verbosity behaveour
|
||||||
|
# 4) add debug option
|
||||||
|
# see rest of changelog at http://cvs.linux.hr/cvsweb.cgi/sql/mysql2pgsql
|
||||||
|
# 2003-12-16 jsp -- Joe Speigle <joe.speigle@jklh.us>:
|
||||||
|
# converts: s/\) *Type=MyISAM;/);/i, enum data type -> references,
|
||||||
|
# auto_increment->sequences
|
||||||
|
# 2004-01-13 jsp -- moved project to gborg; both the above declined ownership
|
||||||
|
# 2004-06-29 converts: year(4), year(2)
|
||||||
|
# homepage: gborg.postgresql.org
|
||||||
|
|
||||||
|
GetOptions("debug", "help");
|
||||||
|
|
||||||
|
my $DEBUG = $opt_debug || 0;
|
||||||
|
my $HELP = $opt_help || 0;
|
||||||
|
|
||||||
|
|
||||||
|
if (($HELP) || ! defined($ARGV[0]) || ! defined($ARGV[1])) {
|
||||||
|
print "Usage: perl $0 {--verbose|--help|--debug} mysql_dump_file.sql pg_dump_file.sql\n";
|
||||||
|
print "\t* OPTIONS\n";
|
||||||
|
print "\t--verbose tees to pg_dump_file.sql and STDOUT during conversion\n";
|
||||||
|
print "\t--debug does ?? \n";
|
||||||
|
print "\t--help prints this message \n";
|
||||||
|
print "\t* REQUIRED ARGUMENTS\n";
|
||||||
|
if (defined ($ARGV[0])) {
|
||||||
|
print "\tmysql_dump_file.sql ($ARGV[0])\n";
|
||||||
|
} else {
|
||||||
|
print "\tmysql_dump_file.sql (undefined)\n";
|
||||||
|
}
|
||||||
|
if (defined ($ARGV[1])) {
|
||||||
|
print "\tpg_dump_file.sql ($ARGV[1])\n";
|
||||||
|
} else {
|
||||||
|
print "\tpg_dump_file.sql (undefined)\n";
|
||||||
|
}
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
open(IN,"<$ARGV[0]") || die "can't open mysql dump file $ARGV[0]";
|
||||||
|
open(OUT,">$ARGV[1]") || die "can't open pg dump file $ARGV[1]";
|
||||||
|
print OUT "-- Generated from $PROG\n";
|
||||||
|
print OUT "-- (c) 2004, PostgreSQL Inc.\n";
|
||||||
|
print OUT "-- (c) 2005, Laurent Destailleur.\n";
|
||||||
|
print OUT "\n";
|
||||||
|
|
||||||
|
sub output_create {
|
||||||
|
print OUT $create_sql;
|
||||||
|
if ($create_index) {
|
||||||
|
print OUT "\n";
|
||||||
|
print OUT $create_index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# reset when moving from each "create table" to "insert" part of dump
|
||||||
|
sub reset_vars() {
|
||||||
|
$create_sql="";
|
||||||
|
$create_index="";
|
||||||
|
%enum_datafield=();
|
||||||
|
$enum_column='';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Boucle sur contenu fichier source
|
||||||
|
#----------------------------------
|
||||||
|
while(<IN>) {
|
||||||
|
|
||||||
|
# comments or empty lines
|
||||||
|
if (/^#/ || /^$/ || /^--/) {
|
||||||
|
print OUT $_;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
if (/^USE\s*([^;]*);/) {
|
||||||
|
print OUT "\\c ". $1;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
if ($create_sql ne "") { # we are inside create table statement so lets process datatypes
|
||||||
|
if (/\);/i) { # end of create table squence
|
||||||
|
$create_sql =~ s/,$//g; # strip last , inside create table
|
||||||
|
&output_create;
|
||||||
|
&reset_vars();
|
||||||
|
next;
|
||||||
|
# LDR Added innodb
|
||||||
|
} elsif (/(ISAM|innodb)/i) { # end of create table sequence
|
||||||
|
s/\) *Type=(MyISAM|innodb);/);/i;
|
||||||
|
$create_sql =~ s/,$//g; # strip last , inside create table
|
||||||
|
$create_sql .= $_;
|
||||||
|
&output_create;
|
||||||
|
&reset_vars();
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
if (/(\w*)\s+enum\(((?:['"]\w+['"]\s*,)+['"]\w+['"])\)(.*)$/i) { # enum handling
|
||||||
|
$enum_column=$1;
|
||||||
|
$enum_datafield{$enum_column} = $2; # 'abc','def', ...
|
||||||
|
my $maxlength=0;
|
||||||
|
foreach my $enum (split(',',$2)) {
|
||||||
|
$enum =~ s/[\"\']//g;
|
||||||
|
if ($maxlength<length($enum)) { $maxlength=length($enum); }
|
||||||
|
}
|
||||||
|
$_ = qq~ $1 CHAR($maxlength) CHECK ($1 IN ($2)) $3\n~;
|
||||||
|
} elsif (/^[\s\t]*(\w*)\s*.*int.*auto_increment/i) { # int,auto_increment -> serial
|
||||||
|
$seq = qq~${table}_${1}_seq~;
|
||||||
|
s/[\s\t]*([a-zA-Z_0-9]*)\s*.*int.*auto_increment[^,]*/ $1 SERIAL PRIMARY KEY/ig;
|
||||||
|
# MYSQL: data_id mediumint(8) unsigned NOT NULL auto_increment,
|
||||||
|
$create_sql.=$_;
|
||||||
|
next;
|
||||||
|
# int type conversion
|
||||||
|
} elsif (/(\w*)int\(\d+\)/i) {
|
||||||
|
$size=$1;
|
||||||
|
$size =~ tr [A-Z] [a-z];
|
||||||
|
if ($size eq "tiny" || $size eq "small") {
|
||||||
|
$out = "int2";
|
||||||
|
} elsif ($size eq "big") {
|
||||||
|
$out = "int8";
|
||||||
|
} else {
|
||||||
|
$out = "int4";
|
||||||
|
}
|
||||||
|
s/\w*int\(\d+\)/$out/g;
|
||||||
|
}
|
||||||
|
|
||||||
|
# nuke int unsigned
|
||||||
|
s/(int\w+)\s+unsigned/$1/gi;
|
||||||
|
|
||||||
|
# blob -> text
|
||||||
|
s/\w*blob/text/gi;
|
||||||
|
# tinytext/mediumtext -> text
|
||||||
|
s/tinytext/text/gi;
|
||||||
|
s/mediumtext/text/gi;
|
||||||
|
|
||||||
|
# char -> varchar
|
||||||
|
# PostgreSQL would otherwise pad with spaces as opposed
|
||||||
|
# to MySQL! Your user interface may depend on this!
|
||||||
|
s/(\s+)char/${1}varchar/gi;
|
||||||
|
|
||||||
|
# nuke date representation (not supported in PostgreSQL)
|
||||||
|
s/datetime default '[^']+'/datetime/i;
|
||||||
|
s/date default '[^']+'/datetime/i;
|
||||||
|
s/time default '[^']+'/datetime/i;
|
||||||
|
|
||||||
|
# change not null datetime field to null valid ones
|
||||||
|
# (to support remapping of "zero time" to null
|
||||||
|
s/datetime not null/datetime/i;
|
||||||
|
|
||||||
|
# nuke size of timestamp
|
||||||
|
s/timestamp\([^)]*\)/timestamp/i;
|
||||||
|
|
||||||
|
# double -> float8
|
||||||
|
s/double\([^)]*\)/float8/i;
|
||||||
|
|
||||||
|
# add unique to definition of type (MySQL separates this)
|
||||||
|
if (/unique \w+ \((\w+)\)/i) {
|
||||||
|
$create_sql.=~s/($1)([^,]+)/$1$2 unique/i;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
# FIX: unique for multipe columns (col1,col2) are unsupported!
|
||||||
|
next if (/unique/i);
|
||||||
|
|
||||||
|
if (/\bkey\b/i && !/^\s+primary key\s+/i) {
|
||||||
|
s/KEY(\s+)[^(]*(\s+)/$1 UNIQUE $2/i; # hack off name of the non-primary key
|
||||||
|
}
|
||||||
|
|
||||||
|
# if key(xxx),
|
||||||
|
if (/key\((\w+)\)/) {
|
||||||
|
$create_index .= "CREATE INDEX ${table}_$1 ON $table ($1);\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# quote column names
|
||||||
|
s/(^\s*)([^\s\-\(]+)(\s*)/$1"$2"$3/gi if (!/\bkey\b/i);
|
||||||
|
|
||||||
|
# remap colums with names of existing system attribute
|
||||||
|
if (/"oid"/i) {
|
||||||
|
s/"oid"/"_oid"/g;
|
||||||
|
print STDERR "WARNING: table $table uses column \"oid\" which is renamed to \"_oid\"\nYou should fix application manually! Press return to continue.";
|
||||||
|
my $wait=<STDIN>;
|
||||||
|
}
|
||||||
|
s/oid/_oid/i if (/key/i && /oid/i); # fix oid in key
|
||||||
|
$create_sql.=$_;
|
||||||
|
} # END of if ($create_sql ne "") i.e. were inside create table statement so processed datatypes
|
||||||
|
else { # not inside create table
|
||||||
|
#---- fix data in inserted data: (from MS world)
|
||||||
|
# FIX: disabled for now
|
||||||
|
if (00 && /insert into/i) {
|
||||||
|
s!\x96!-!g; # --
|
||||||
|
s!\x93!"!g; # ``
|
||||||
|
s!\x94!"!g; # ''
|
||||||
|
s!\x85!... !g; # \ldots
|
||||||
|
s!\x92!`!g;
|
||||||
|
}
|
||||||
|
|
||||||
|
# fix dates '0000-00-00 00:00:00' (should be null)
|
||||||
|
s/'0000-00-00 00:00:00'/null/gi;
|
||||||
|
s/'0000-00-00'/null/gi;
|
||||||
|
s/'00:00:00'/null/gi;
|
||||||
|
s/([12]\d\d\d)([01]\d)([0-3]\d)([0-2]\d)([0-6]\d)([0-6]\d)/'$1-$2-$3 $4:$5:$6'/;
|
||||||
|
|
||||||
|
if (/create\s+table\s+(\w+)/i) {
|
||||||
|
$create_sql = $_;
|
||||||
|
/create\s*table\s*(\w+)/i;
|
||||||
|
$table=$1 if (defined($1));
|
||||||
|
} else {
|
||||||
|
print OUT $_;
|
||||||
|
}
|
||||||
|
} # end of if inside create_table
|
||||||
|
} # END while(<IN>)
|
||||||
|
|
||||||
|
close IN;
|
||||||
|
close OUT;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
print "Build ".(scalar keys %filelist)." file(s).\n";
|
||||||
|
|
||||||
|
0;
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
@@ -24,9 +28,9 @@
|
|||||||
|
|
||||||
create table llx_action_def
|
create table llx_action_def
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid integer NOT NULL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
titre varchar(255) NOT NULL,
|
"titre" varchar(255) NOT NULL,
|
||||||
description text,
|
"description" text,
|
||||||
objet_type CHAR(10) CHECK (objet_type IN ('ficheinter','facture','propale','mailing'))
|
"objet_type" varchar(10) CHECK (objet_type IN ('ficheinter','facture','propale','mailing'))
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,26 +24,23 @@
|
|||||||
--
|
--
|
||||||
-- Actions commerciales
|
-- Actions commerciales
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
create table llx_actioncomm
|
create table llx_actioncomm
|
||||||
(
|
(
|
||||||
id SERIAL PRIMARY KEY,
|
id SERIAL PRIMARY KEY,
|
||||||
datea timestamp without time zone, -- action date
|
"datea" timestamp, -- action date
|
||||||
fk_action integer,
|
"fk_action" integer,
|
||||||
label varchar(50), -- libelle de l'action
|
"label" varchar(50), -- libelle de l'action
|
||||||
fk_soc integer,
|
"fk_soc" integer,
|
||||||
fk_contact integer default 0,
|
"fk_contact" integer default 0,
|
||||||
fk_user_action integer, -- id de la personne qui doit effectuer l'action
|
"fk_user_action" integer, -- id de la personne qui doit effectuer l'action
|
||||||
fk_user_author integer,
|
"fk_user_author" integer,
|
||||||
priority smallint,
|
"priority" smallint,
|
||||||
percent smallint,
|
"percent" smallint,
|
||||||
note text,
|
"note" text,
|
||||||
propalrowid integer,
|
"propalrowid" integer,
|
||||||
fk_facture integer
|
"fk_facture" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortiero <benoit.mortier@opensides.be>
|
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,38 +24,37 @@
|
|||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
--
|
||||||
-- statut
|
-- statut
|
||||||
-- 0 : non adherent
|
-- 0 : non adherent
|
||||||
-- 1 : adherent
|
-- 1 : adherent
|
||||||
|
|
||||||
create table llx_adherent
|
create table llx_adherent
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
statut smallint NOT NULL DEFAULT 0,
|
"statut" smallint NOT NULL DEFAULT 0,
|
||||||
public smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ?
|
"public" smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ?
|
||||||
fk_adherent_type smallint,
|
"fk_adherent_type" smallint,
|
||||||
morphy CHAR(3) CHECK (morphy IN ('mor','phy')) NOT NULL, -- personne morale / personne physique
|
"morphy" varchar(3) CHECK (morphy IN ('mor','phy')) NOT NULL, -- personne morale / personne physique
|
||||||
datevalid timestamp without time zone, -- date de validation
|
"datevalid" datetime, -- date de validation
|
||||||
datec timestamp without time zone, -- date de creation
|
"datec" datetime, -- date de creation
|
||||||
prenom varchar(50),
|
"prenom" varchar(50),
|
||||||
nom varchar(50),
|
"nom" varchar(50),
|
||||||
societe varchar(50),
|
"societe" varchar(50),
|
||||||
adresse text,
|
"adresse" text,
|
||||||
cp varchar(30),
|
"cp" varchar(30),
|
||||||
ville varchar(50),
|
"ville" varchar(50),
|
||||||
pays varchar(50),
|
"pays" varchar(50),
|
||||||
email varchar(255),
|
"email" varchar(255),
|
||||||
login varchar(50) NOT NULL, -- login utilise pour editer sa fiche
|
"login" varchar(50) NOT NULL, -- login utilise pour editer sa fiche
|
||||||
pass varchar(50), -- pass utilise pour editer sa fiche
|
"pass" varchar(50), -- pass utilise pour editer sa fiche
|
||||||
naiss date, -- date de naissance
|
"naiss" date, -- date de naissance
|
||||||
photo varchar(255), -- url vers la photo de l'adherent
|
"photo" varchar(255), -- url vers la photo de l'adherent
|
||||||
fk_user_author integer NOT NULL,
|
"fk_user_author" integer NOT NULL,
|
||||||
fk_user_mod integer NOT NULL,
|
"fk_user_mod" integer NOT NULL,
|
||||||
fk_user_valid integer NOT NULL,
|
"fk_user_valid" integer NOT NULL,
|
||||||
datefin timestamp without time zone NOT NULL, -- date de fin de validit<69> de la cotisation
|
"datefin" datetime, -- date de fin de validit<69> de la cotisation
|
||||||
note text
|
"note" text,
|
||||||
);
|
|
||||||
|
|
||||||
CREATE UNIQUE INDEX llx_adherent_login ON llx_adherent (login);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,13 +25,12 @@
|
|||||||
--
|
--
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
create table llx_adherent_options
|
|
||||||
(
|
|
||||||
optid SERIAL PRIMARY KEY,
|
|
||||||
tms timestamp,
|
|
||||||
adhid integer NOT NULL -- id de l'adherent auquel correspond ces attributs optionnel
|
|
||||||
-- telfixe varchar(15),
|
-- telfixe varchar(15),
|
||||||
-- teljob varchar(15)
|
-- teljob varchar(15)
|
||||||
);
|
|
||||||
|
|
||||||
CREATE UNIQUE INDEX llx_adherent_options_adhid ON llx_adherent_options (adhid);
|
create table llx_adherent_options
|
||||||
|
(
|
||||||
|
optid SERIAL PRIMARY KEY,
|
||||||
|
"tms" timestamp,
|
||||||
|
"adhid" integer NOT NULL, -- id de l'adherent auquel correspond ces attributs optionnel
|
||||||
|
);
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -25,6 +28,6 @@
|
|||||||
create table llx_adherent_options_label
|
create table llx_adherent_options_label
|
||||||
(
|
(
|
||||||
name varchar(64) PRIMARY KEY, -- nom de l'attribut
|
name varchar(64) PRIMARY KEY, -- nom de l'attribut
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
label varchar(255) NOT NULL -- label correspondant a l'attribut
|
"label" varchar(255) NOT NULL -- label correspondant a l'attribut
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,20 +24,19 @@
|
|||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
--
|
||||||
-- statut
|
-- statut
|
||||||
-- 0 : actif
|
-- 0 : actif
|
||||||
-- 1 : inactif
|
-- 1 : inactif
|
||||||
|
|
||||||
|
|
||||||
create table llx_adherent_type
|
create table llx_adherent_type
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
statut smallint NOT NULL DEFAULT 0,
|
"statut" smallint NOT NULL DEFAULT 0,
|
||||||
libelle varchar(50),
|
"libelle" varchar(50),
|
||||||
cotisation CHAR(3) CHECK (cotisation IN ('yes','no')) NOT NULL DEFAULT 'yes',
|
"cotisation" varchar(3) CHECK (cotisation IN ('yes','no')) NOT NULL DEFAULT 'yes',
|
||||||
vote CHAR(3) CHECK (vote IN ('yes','no')) NOT NULL DEFAULT 'yes',
|
"vote" varchar(3) CHECK (vote IN ('yes','no')) NOT NULL DEFAULT 'yes',
|
||||||
note text,
|
"note" text,
|
||||||
mail_valid text -- mail envoye a la validation
|
"mail_valid" text -- mail envoye a la validation
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2004 Benoit mortier <benoit;mortier@opensides.be>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,14 +26,14 @@
|
|||||||
|
|
||||||
create table llx_album
|
create table llx_album
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
osc_id integer NOT NULL,
|
"osc_id" integer NOT NULL,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
ref varchar(12),
|
"ref" varchar(12),
|
||||||
title varchar(64),
|
"title" varchar(64),
|
||||||
annee smallint,
|
"annee" int2,
|
||||||
description text,
|
"description" text,
|
||||||
collectif smallint,
|
"collectif" tinyint,
|
||||||
fk_user_author integer
|
"fk_user_author" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,10 +24,10 @@
|
|||||||
--
|
--
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_album_to_groupart
|
create table llx_album_to_groupart
|
||||||
(
|
(
|
||||||
fk_album integer NOT NULL,
|
"fk_album" integer NOT NULL,
|
||||||
fk_groupart integer NOT NULL,
|
"fk_groupart" integer NOT NULL
|
||||||
|
|
||||||
UNIQUE (fk_album, fk_groupart)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,12 +26,12 @@
|
|||||||
|
|
||||||
create table llx_appro
|
create table llx_appro
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
datec timestamp without time zone,
|
"datec" datetime,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
fk_product integer NOT NULL,
|
"fk_product" integer NOT NULL,
|
||||||
quantity smallint NOT NULL,
|
"quantity" smallint unsigned NOT NULL,
|
||||||
price real,
|
"price" real,
|
||||||
fk_user_author integer
|
"fk_user_author" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,9 +26,9 @@
|
|||||||
|
|
||||||
create table llx_auteur
|
create table llx_auteur
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
oscid integer NOT NULL,
|
"oscid" integer NOT NULL,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
nom varchar(255),
|
"nom" varchar(255),
|
||||||
fk_user_author integer
|
"fk_user_author" integer
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
--
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,29 +22,25 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table llx_bank
|
create table llx_bank
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
datec timestamp without time zone,
|
"datec" datetime,
|
||||||
datev date, -- date de valeur
|
"datev" date, -- date de valeur
|
||||||
dateo date, -- date operation
|
"dateo" date, -- date operation
|
||||||
amount real NOT NULL default 0,
|
"amount" real NOT NULL default 0,
|
||||||
label varchar(255),
|
"label" varchar(255),
|
||||||
fk_account integer,
|
"fk_account" integer,
|
||||||
fk_user_author integer,
|
"fk_user_author" integer,
|
||||||
fk_user_rappro integer,
|
"fk_user_rappro" integer,
|
||||||
fk_type varchar(4), -- CB, Virement, cheque
|
"fk_type" varchar(4), -- CB, Virement, cheque
|
||||||
num_releve varchar(50),
|
"num_releve" varchar(50),
|
||||||
num_chq int,
|
"num_chq" int,
|
||||||
rappro int default 0,
|
"rappro" tinyint default 0,
|
||||||
note text,
|
"note" text,
|
||||||
|
"author" varchar(40) -- a supprimer apres migration
|
||||||
|
|
||||||
author varchar(40) -- a supprimer apres migration
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
-- ===================================================================
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
-- (c) 2005, Laurent Destailleur.
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
@@ -21,25 +23,29 @@
|
|||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- ===================================================================
|
--
|
||||||
|
-- courant : indique si c'est un compte courant
|
||||||
|
-- clos : le compte est-il clos ou encore ouvert
|
||||||
|
--
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
create table llx_bank_account
|
create table llx_bank_account
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
datec timestamp without time zone,
|
"datec" datetime,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
label varchar(30),
|
"label" varchar(30),
|
||||||
bank varchar(60),
|
"bank" varchar(60),
|
||||||
code_banque varchar(7),
|
"code_banque" varchar(7),
|
||||||
code_guichet varchar(6),
|
"code_guichet" varchar(6),
|
||||||
number varchar(255),
|
"number" varchar(255),
|
||||||
cle_rib varchar(5),
|
"cle_rib" varchar(5),
|
||||||
bic varchar(10),
|
"bic" varchar(10),
|
||||||
iban_prefix varchar(5),
|
"iban_prefix" varchar(5),
|
||||||
domiciliation varchar(255),
|
"domiciliation" varchar(255),
|
||||||
proprio varchar(60),
|
"proprio" varchar(60),
|
||||||
adresse_proprio varchar(255),
|
"adresse_proprio" varchar(255),
|
||||||
courant smallint DEFAULT 0 NOT NULL,
|
"courant" smallint DEFAULT 0 NOT NULL,
|
||||||
clos smallint DEFAULT 0 NOT NULL,
|
"clos" smallint DEFAULT 0 NOT NULL,
|
||||||
account_number varchar(8)
|
"account_number" varchar(8)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,13 +20,10 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
create table llx_bank_categ
|
create table llx_bank_categ
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
label varchar(255)
|
"label" varchar(255)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,15 +20,12 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_bank_class
|
create table llx_bank_class
|
||||||
(
|
(
|
||||||
lineid integer NOT NULL,
|
"lineid" integer NOT NULL,
|
||||||
fk_categ integer NOT NULL
|
"fk_categ" integer NOT NULL,
|
||||||
|
"INDEX"(lineid)
|
||||||
);
|
);
|
||||||
|
|
||||||
create index llx_bank_class_lineid on llx_bank_class(lineid);
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,15 +24,5 @@
|
|||||||
--
|
--
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
create table llx_cash
|
|
||||||
(
|
ALTER TABLE llx_bank_url ADD UNIQUE uk_bank_url (fk_bank,url_id);
|
||||||
rowid serial PRIMARY KEY,
|
|
||||||
datec timestamp,
|
|
||||||
dateo date NOT NULL, -- date operation
|
|
||||||
amount real NOT NULL default 0,
|
|
||||||
label varchar(255),
|
|
||||||
fk_account integer, -- Pour gerer plusieurs caisse
|
|
||||||
fk_user_author integer,
|
|
||||||
fk_type varchar(4), -- Liquide, retrait, depot
|
|
||||||
note text
|
|
||||||
);
|
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,9 +26,9 @@
|
|||||||
|
|
||||||
create table llx_bank_url
|
create table llx_bank_url
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_bank integer,
|
"fk_bank" integer,
|
||||||
url_id integer,
|
"url_id" integer,
|
||||||
url varchar(255),
|
"url" varchar(255),
|
||||||
label varchar(255)
|
"label" varchar(255)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,16 +20,12 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_bookmark
|
create table llx_bookmark
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_soc integer,
|
"fk_soc" integer,
|
||||||
fk_user integer,
|
"fk_user" integer,
|
||||||
dateb timestamp without time zone
|
"dateb" datetime
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,9 +24,10 @@
|
|||||||
--
|
--
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_bookmark4u_login
|
create table llx_bookmark4u_login
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_user integer,
|
"fk_user" integer,
|
||||||
bk4u_uid integer
|
"bk4u_uid" integer
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -27,8 +30,8 @@
|
|||||||
|
|
||||||
create table llx_boxes
|
create table llx_boxes
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
box_id integer NOT NULL,
|
"box_id" integer NOT NULL,
|
||||||
position smallint NOT NULL
|
"position" smallint NOT NULL,
|
||||||
|
"box_order" smallint default 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,8 +26,8 @@
|
|||||||
|
|
||||||
create table llx_boxes_def
|
create table llx_boxes_def
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
name varchar(255) NOT NULL,
|
"name" varchar(255) NOT NULL,
|
||||||
file varchar(255) NOT NULL,
|
"file" varchar(255) NOT NULL,
|
||||||
note text
|
"note" text
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,11 +26,12 @@
|
|||||||
|
|
||||||
create table llx_c_accountingsystem
|
create table llx_c_accountingsystem
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_pays integer NOT NULL,
|
"fk_pays" integer NOT NULL,
|
||||||
pcg_version varchar(12) NOT NULL,
|
"pcg_version" varchar(12) NOT NULL,
|
||||||
pcg_type varchar(20) NOT NULL,
|
"pcg_type" varchar(20) NOT NULL,
|
||||||
pcg_subtype varchar(20) NOT NULL,
|
"pcg_subtype" varchar(20) NOT NULL,
|
||||||
label varchar(128) NOT NULL,
|
"label" varchar(128) NOT NULL,
|
||||||
account_number varchar(20) NOT NULL
|
"account_number" varchar(20) NOT NULL,
|
||||||
|
"account_parent" varchar(20)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,19 +23,13 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
create table llx_c_actioncomm
|
create table llx_c_actioncomm
|
||||||
(
|
(
|
||||||
id SERIAL PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
code varchar(12) UNIQUE NOT NULL,
|
"type" varchar(10) DEFAULT 'system' NOT NULL,
|
||||||
type varchar(10) DEFAULT 'system' NOT NULL,
|
"libelle" varchar(30) NOT NULL,
|
||||||
libelle varchar(30) NOT NULL,
|
"active" tinyint DEFAULT 1 NOT NULL,
|
||||||
active smallint DEFAULT 1 NOT NULL,
|
"todo" tinyint
|
||||||
todo smallint
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,16 +23,13 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
create table llx_c_ape
|
create table llx_c_ape
|
||||||
(
|
(
|
||||||
rowid serial UNIQUE,
|
rowid SERIAL PRIMARY KEY,
|
||||||
code_ape varchar(5) PRIMARY KEY,
|
code_ape varchar(5) PRIMARY KEY,
|
||||||
libelle varchar(255),
|
"libelle" varchar(255),
|
||||||
active smallint DEFAULT 1 NOT NULL
|
"active" tinyint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,12 +24,13 @@
|
|||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
create table llx_c_chargesociales
|
create table llx_c_chargesociales
|
||||||
(
|
(
|
||||||
id SERIAL PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
libelle varchar(80),
|
"libelle" varchar(80),
|
||||||
deductible integer DEFAULT 0 NOT NULL,
|
"deductible" smallint DEFAULT 0 NOT NULL,
|
||||||
active integer DEFAULT 1 NOT NULL
|
"active" tinyint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,9 +26,8 @@
|
|||||||
|
|
||||||
create table llx_c_civilite
|
create table llx_c_civilite
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid integer PRIMARY KEY,
|
||||||
code varchar(6) UNIQUE NOT NULL,
|
"civilite" varchar(50),
|
||||||
civilite varchar(50),
|
"active" tinyint DEFAULT 1 NOT NULL
|
||||||
active smallint DEFAULT 1 NOT NULL
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
32
pgsql/tables/llx_c_currencies.sql
Normal file
32
pgsql/tables/llx_c_currencies.sql
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ========================================================================
|
||||||
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
|
--
|
||||||
|
-- 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_c_currencies
|
||||||
|
(
|
||||||
|
"label" varchar(64),
|
||||||
|
"active" tinyint DEFAULT 1 NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
@@ -1,6 +1,13 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,21 +23,21 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_c_departements
|
create table llx_c_departements
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
code_departement varchar(6) NOT NULL,
|
"code_departement" varchar(6) NOT NULL,
|
||||||
fk_region integer,
|
"fk_region" integer,
|
||||||
cheflieu varchar(7),
|
"cheflieu" varchar(7),
|
||||||
tncc integer,
|
"tncc" integer,
|
||||||
ncc varchar(50),
|
"ncc" varchar(50),
|
||||||
nom varchar(50),
|
"nom" varchar(50),
|
||||||
active smallint DEFAULT 1 NOT NULL
|
"active" tinyint DEFAULT 1 NOT NULL,
|
||||||
|
key (fk_region)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX llx_c_departements_fk_region ON llx_c_departements(fk_region);
|
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,34 @@
|
|||||||
-- ========================================================================
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ========================================================================
|
||||||
|
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
|
--
|
||||||
|
-- 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_c_effectif
|
||||||
|
(
|
||||||
|
id integer PRIMARY KEY,
|
||||||
|
"libelle" varchar(30),
|
||||||
|
"active" tinyint DEFAULT 1 NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,12 +25,12 @@
|
|||||||
--
|
--
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_c_forme_juridique
|
create table llx_c_forme_juridique
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
code varchar(12) UNIQUE NOT NULL,
|
"fk_pays" integer NOT NULL,
|
||||||
fk_pays integer NOT NULL,
|
"libelle" varchar(255),
|
||||||
libelle varchar(255),
|
"active" tinyint DEFAULT 1 NOT NULL
|
||||||
active smallint DEFAULT 1 NOT NULL
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
35
pgsql/tables/llx_c_methode_commande_fournisseur.sql
Normal file
35
pgsql/tables/llx_c_methode_commande_fournisseur.sql
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ========================================================================
|
||||||
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
|
--
|
||||||
|
-- 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_c_methode_commande_fournisseur
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"code" varchar(30),
|
||||||
|
"libelle" varchar(30),
|
||||||
|
"active" tinyint default 1 NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,7 +24,6 @@
|
|||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Type :
|
-- Type :
|
||||||
--
|
--
|
||||||
@@ -31,11 +33,10 @@
|
|||||||
|
|
||||||
create table llx_c_paiement
|
create table llx_c_paiement
|
||||||
(
|
(
|
||||||
id SERIAL PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
code varchar(6),
|
"libelle" varchar(30),
|
||||||
libelle varchar(30),
|
"type" smallint,
|
||||||
type smallint,
|
"active" tinyint DEFAULT 1 NOT NULL
|
||||||
active smallint DEFAULT 1 not null
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,17 +23,13 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
create table llx_c_pays
|
create table llx_c_pays
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid integer PRIMARY KEY,
|
||||||
code varchar(6) UNIQUE NOT NULL,
|
"libelle" varchar(25) NOT NULL,
|
||||||
libelle varchar(25) NOT NULL,
|
"active" tinyint DEFAULT 1 NOT NULL
|
||||||
active smallint DEFAULT 1 NOT NULL
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,16 +23,12 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
create table llx_c_propalst
|
create table llx_c_propalst
|
||||||
(
|
(
|
||||||
id SERIAL PRIMARY KEY,
|
id smallint PRIMARY KEY,
|
||||||
code varchar(12) UNIQUE NOT NULL,
|
"label" varchar(30),
|
||||||
label varchar(30),
|
"active" tinyint DEFAULT 1 NOT NULL
|
||||||
active integer DEFAULT 1 NOT NULL
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
28
pgsql/tables/llx_c_regions.key.sql
Normal file
28
pgsql/tables/llx_c_regions.key.sql
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ========================================================================
|
||||||
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
|
--
|
||||||
|
-- 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_c_regions ADD CONSTRAINT c_regions_fk_pays FOREIGN KEY (fk_pays) REFERENCES llx_c_pays (rowid);
|
||||||
@@ -1,6 +1,13 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,19 +23,15 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
create table llx_c_regions
|
create table llx_c_regions
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
code_region integer UNIQUE NOT NULL,
|
"fk_pays" integer NOT NULL,
|
||||||
fk_pays integer NOT NULL,
|
"cheflieu" varchar(7),
|
||||||
cheflieu varchar(7),
|
"tncc" integer,
|
||||||
tncc integer,
|
"nom" varchar(50),
|
||||||
nom varchar(50),
|
"active" tinyint DEFAULT 1 NOT NULL
|
||||||
active smallint DEFAULT 1 NOT NULL
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,16 +23,12 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
create table llx_c_stcomm
|
create table llx_c_stcomm
|
||||||
(
|
(
|
||||||
id SERIAL PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
code varchar(12) UNIQUE NOT NULL,
|
"libelle" varchar(30),
|
||||||
libelle varchar(30),
|
"active" tinyint default 1 NOT NULL
|
||||||
active smallint DEFAULT 1 NOT NULL
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,8 +27,7 @@
|
|||||||
|
|
||||||
create table llx_c_typent
|
create table llx_c_typent
|
||||||
(
|
(
|
||||||
id SERIAL PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
code varchar(12) UNIQUE NOT NULL,
|
"libelle" varchar(30),
|
||||||
libelle varchar(30),
|
"active" tinyint DEFAULT 1 NOT NULL
|
||||||
active smallint DEFAULT 1 NOT NULL
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -24,10 +26,14 @@
|
|||||||
|
|
||||||
create table llx_chargesociales
|
create table llx_chargesociales
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
libelle varchar(80),
|
"date_ech" datetime, -- date d'echeance
|
||||||
deductible smallint DEFAULT 0 NOT NULL,
|
"date_pai" datetime, -- date de paiements
|
||||||
active smallint DEFAULT 0 NOT NULL
|
"libelle" varchar(80),
|
||||||
|
"fk_type" integer,
|
||||||
|
"amount" real default 0 NOT NULL,
|
||||||
|
"paye" smallint default 0 NOT NULL,
|
||||||
|
"periode" date
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,16 +21,15 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_co_fa
|
create table llx_co_fa
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_commande integer NOT NULL,
|
"fk_commande" integer NOT NULL,
|
||||||
fk_facture integer NOT NULL
|
"fk_facture" integer NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX llx_co_fa_fk_commande ON llx_co_fa(fk_commande);
|
CREATE INDEX llx_co_fa_fk_commande ON llx_co_fa (fk_commande);
|
||||||
|
CREATE INDEX llx_co_fa_fk_facture ON llx_co_fa (fk_facture);
|
||||||
CREATE INDEX llx_co_fa_fk_facture ON llx_co_fa(fk_facture);
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,12 +21,11 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
create table llx_co_pr
|
create table llx_co_pr
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_commande integer,
|
"fk_commande" integer,
|
||||||
fk_propale integer
|
"fk_propale" integer
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,31 +26,28 @@
|
|||||||
|
|
||||||
create table llx_commande
|
create table llx_commande
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
fk_soc integer,
|
"fk_soc" integer,
|
||||||
fk_soc_contact integer,
|
"fk_soc_contact" integer,
|
||||||
fk_projet integer DEFAULT 0, -- projet auquel est rattache la commande
|
"fk_projet" integer DEFAULT 0, -- projet auquel est rattache la commande
|
||||||
ref varchar(30) NOT NULL, -- propal number
|
"ref" varchar(30) NOT NULL, -- propal number
|
||||||
date_creation timestamp without time zone, -- date de creation
|
"date_creation" datetime, -- date de creation
|
||||||
date_valid timestamp without time zone, -- date de validation
|
"date_valid" datetime, -- date de validation
|
||||||
date_cloture timestamp without time zone, -- date de cloture
|
"date_cloture" datetime, -- date de cloture
|
||||||
date_commande date, -- date de la commande
|
"date_commande" date, -- date de la commande
|
||||||
fk_user_author integer, -- createur de la commande
|
"fk_user_author" integer, -- createur de la commande
|
||||||
fk_user_valid integer, -- valideur de la commande
|
"fk_user_valid" integer, -- valideur de la commande
|
||||||
fk_user_cloture integer, -- cloture de la propale signee ou non signee
|
"fk_user_cloture" integer, -- cloture de la propale signee ou non signee
|
||||||
source smallint NOT NULL,
|
"source" smallint NOT NULL,
|
||||||
fk_statut smallint default 0,
|
"fk_statut" smallint default 0,
|
||||||
amount_ht real default 0,
|
"amount_ht" real default 0,
|
||||||
remise_percent real default 0,
|
"remise_percent" real default 0,
|
||||||
remise real default 0,
|
"remise" real default 0,
|
||||||
tva real default 0,
|
"tva" real default 0,
|
||||||
total_ht real default 0,
|
"total_ht" real default 0,
|
||||||
total_ttc real default 0,
|
"total_ttc" real default 0,
|
||||||
note text,
|
"note" text,
|
||||||
model_pdf varchar(50),
|
"model_pdf" varchar(50),
|
||||||
facture smallint default 0,
|
"facture" tinyint default 0,
|
||||||
|
4294967294);
|
||||||
UNIQUE (ref)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|||||||
54
pgsql/tables/llx_commande_fournisseur.sql
Normal file
54
pgsql/tables/llx_commande_fournisseur.sql
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
--
|
||||||
|
-- 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_commande_fournisseur
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"tms" timestamp,
|
||||||
|
"fk_soc" integer,
|
||||||
|
"fk_soc_contact" integer,
|
||||||
|
"fk_projet" integer DEFAULT 0, -- projet auquel est rattache la commande
|
||||||
|
"ref" varchar(30) NOT NULL, -- propal number
|
||||||
|
"date_creation" datetime, -- date de creation
|
||||||
|
"date_valid" datetime, -- date de validation
|
||||||
|
"date_cloture" datetime, -- date de cloture
|
||||||
|
"date_commande" date, -- date de la commande
|
||||||
|
"fk_methode_commande" integer default 0,
|
||||||
|
"fk_user_author" integer, -- createur de la commande
|
||||||
|
"fk_user_valid" integer, -- valideur de la commande
|
||||||
|
"fk_user_cloture" integer, -- cloture de la propale signee ou non signee
|
||||||
|
"source" smallint NOT NULL,
|
||||||
|
"fk_statut" smallint default 0,
|
||||||
|
"amount_ht" real default 0,
|
||||||
|
"remise_percent" real default 0,
|
||||||
|
"remise" real default 0,
|
||||||
|
"tva" real default 0,
|
||||||
|
"total_ht" real default 0,
|
||||||
|
"total_ttc" real default 0,
|
||||||
|
"note" text,
|
||||||
|
"model_pdf" varchar(50),
|
||||||
|
4294967294);
|
||||||
35
pgsql/tables/llx_commande_fournisseur_log.sql
Normal file
35
pgsql/tables/llx_commande_fournisseur_log.sql
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
--
|
||||||
|
-- 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_commande_fournisseur_log
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"tms" timestamp,
|
||||||
|
"datelog" datetime,
|
||||||
|
"fk_commande" integer NOT NULL,
|
||||||
|
"fk_statut" smallint NOT NULL,
|
||||||
|
"fk_user" integer NOT NULL
|
||||||
|
);
|
||||||
40
pgsql/tables/llx_commande_fournisseurdet.sql
Normal file
40
pgsql/tables/llx_commande_fournisseurdet.sql
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
--
|
||||||
|
-- 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_commande_fournisseurdet
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"fk_commande" integer,
|
||||||
|
"fk_product" integer,
|
||||||
|
"ref" varchar(50),
|
||||||
|
"label" varchar(255),
|
||||||
|
"description" text,
|
||||||
|
"tva_tx" real DEFAULT 19.6, -- taux tva
|
||||||
|
"qty" real, -- quantit<69>
|
||||||
|
"remise_percent" real DEFAULT 0, -- pourcentage de remise
|
||||||
|
"remise" real DEFAULT 0, -- montant de la remise
|
||||||
|
"subprice" real, -- prix avant remise
|
||||||
|
"price" real -- prix final
|
||||||
|
);
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,20 +21,19 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
create table llx_commandedet
|
create table llx_commandedet
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_commande integer,
|
"fk_commande" integer,
|
||||||
fk_product integer,
|
"fk_product" integer,
|
||||||
label varchar(255),
|
"label" varchar(255),
|
||||||
description text,
|
"description" text,
|
||||||
tva_tx real DEFAULT 19.6, -- taux tva
|
"tva_tx" real DEFAULT 19.6, -- taux tva
|
||||||
qty real, -- quantit<69>
|
"qty" real, -- quantit<69>
|
||||||
remise_percent real DEFAULT 0, -- pourcentage de remise
|
"remise_percent" real DEFAULT 0, -- pourcentage de remise
|
||||||
remise real DEFAULT 0, -- montant de la remise
|
"remise" real DEFAULT 0, -- montant de la remise
|
||||||
subprice real, -- prix avant remise
|
"subprice" real, -- prix avant remise
|
||||||
price real -- prix final
|
"price" real -- prix final
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
--
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,23 +22,19 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_compta
|
create table llx_compta
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
datec timestamp without time zone,
|
"datec" datetime,
|
||||||
datev date, -- date de valeur
|
"datev" date, -- date de valeur
|
||||||
amount real DEFAULT 0 NOT NULL,
|
"amount" real DEFAULT 0 NOT NULL ,
|
||||||
label varchar(255),
|
"label" varchar(255),
|
||||||
fk_compta_account integer,
|
"fk_compta_account" integer,
|
||||||
fk_user_author integer,
|
"fk_user_author" integer,
|
||||||
fk_user_valid integer,
|
"fk_user_valid" integer,
|
||||||
valid int default 0,
|
"valid" tinyint DEFAULT 0,
|
||||||
note text
|
"note" text
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
--
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- $Id$
|
||||||
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,19 +22,15 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
|
||||||
-- $Source$
|
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_compta_account
|
create table llx_compta_account
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
datec timestamp without time zone,
|
"datec" datetime,
|
||||||
number varchar(12),
|
"number" varchar(12),
|
||||||
label varchar(255),
|
"label" varchar(255),
|
||||||
fk_user_author integer,
|
"fk_user_author" integer,
|
||||||
note text
|
"note" text
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|||||||
36
pgsql/tables/llx_compta_compte_generaux.sql
Normal file
36
pgsql/tables/llx_compta_compte_generaux.sql
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
--
|
||||||
|
-- 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_compta_compte_generaux
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"date_creation" datetime,
|
||||||
|
"numero" varchar(50),
|
||||||
|
"intitule" varchar(255),
|
||||||
|
"fk_user_author" integer,
|
||||||
|
"note" text
|
||||||
|
);
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,13 +26,13 @@
|
|||||||
|
|
||||||
create table llx_concert
|
create table llx_concert
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
date_concert timestamp without time zone NOT NULL,
|
"date_concert" datetime,
|
||||||
description text,
|
"description" text,
|
||||||
collectif smallint DEFAULT 0 NOT NULL,
|
"collectif" tinyint DEFAULT 0 NOT NULL,
|
||||||
fk_groupart integer,
|
"fk_groupart" integer,
|
||||||
fk_lieu_concert integer,
|
"fk_lieu_concert" integer,
|
||||||
fk_user_author integer
|
"fk_user_author" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,11 +26,12 @@
|
|||||||
|
|
||||||
create table llx_cond_reglement
|
create table llx_cond_reglement
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid integer PRIMARY KEY,
|
||||||
sortorder smallint,
|
"code" varchar(16),
|
||||||
actif smallint DEFAULT 1,
|
"sortorder" smallint,
|
||||||
libelle varchar(255),
|
"actif" tinyint DEFAULT 1,
|
||||||
libelle_facture text,
|
"libelle" varchar(255),
|
||||||
fdm smallint, -- reglement fin de mois
|
"libelle_facture" text,
|
||||||
nbjour smallint
|
"fdm" tinyint, -- reglement fin de mois
|
||||||
|
"nbjour" smallint
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
-- Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -25,14 +28,13 @@
|
|||||||
-- Definitions des constantes utilis<69>s comme parametres de configuration
|
-- Definitions des constantes utilis<69>s comme parametres de configuration
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|
||||||
create table llx_const
|
create table llx_const
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
name varchar(255),
|
"name" varchar(255),
|
||||||
value text, -- max 65535 caracteres
|
"value" text, -- max 65535 caracteres
|
||||||
type CHAR(6) CHECK (type IN ('yesno','texte','chaine')),
|
"type" varchar(6) CHECK (type IN ('yesno','texte','chaine')) ,
|
||||||
visible smallint DEFAULT 1 NOT NULL,
|
"visible" tinyint DEFAULT 1 NOT NULL,
|
||||||
note text
|
"note" text
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE UNIQUE INDEX llx_const_idx ON llx_const (name);
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,11 +26,10 @@
|
|||||||
--
|
--
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_contact_facture
|
create table llx_contact_facture
|
||||||
(
|
(
|
||||||
idp serial PRIMARY KEY,
|
idp SERIAL PRIMARY KEY,
|
||||||
fk_soc integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
fk_contact integer NOT NULL, -- point sur llx_socpeople
|
"fk_contact" integer NOT NULL, -- point sur llx_socpeople
|
||||||
|
|
||||||
UNIQUE (fk_soc, fk_contact)
|
|
||||||
);
|
);
|
||||||
|
|||||||
39
pgsql/tables/llx_contrat.key.sql
Normal file
39
pgsql/tables/llx_contrat.key.sql
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
--
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
--
|
||||||
|
--
|
||||||
|
ALTER TABLE llx_contrat ADD INDEX (fk_soc);
|
||||||
|
ALTER TABLE llx_contrat ADD INDEX (fk_commercial_signature);
|
||||||
|
ALTER TABLE llx_contrat ADD INDEX (fk_commercial_suivi);
|
||||||
|
ALTER TABLE llx_contrat ADD INDEX (fk_user_author);
|
||||||
|
--
|
||||||
|
--
|
||||||
|
ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);
|
||||||
|
ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_commercial_signature) REFERENCES llx_user (rowid);
|
||||||
|
ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_commercial_suivi) REFERENCES llx_user (rowid);
|
||||||
|
ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||||
@@ -1,6 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,20 +25,23 @@
|
|||||||
--
|
--
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table llx_contrat
|
create table llx_contrat
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
enservice smallint DEFAULT 0,
|
"datec" datetime, -- date de creation de l'enregistrement
|
||||||
mise_en_service timestamp without time zone,
|
"date_contrat" datetime,
|
||||||
fin_validite timestamp without time zone,
|
"statut" smallint DEFAULT 0,
|
||||||
date_cloture timestamp without time zone,
|
"mise_en_service" datetime,
|
||||||
fk_soc integer NOT NULL,
|
"fin_validite" datetime,
|
||||||
fk_product integer NOT NULL,
|
"date_cloture" datetime,
|
||||||
fk_facture integer NOT NULL DEFAULT 0,
|
"fk_soc" integer NOT NULL,
|
||||||
fk_facturedet integer NOT NULL DEFAULT 0,
|
"fk_commercial_signature" integer NOT NULL,
|
||||||
fk_user_author integer NOT NULL,
|
"fk_commercial_suivi" integer NOT NULL,
|
||||||
fk_user_mise_en_service integer,
|
"fk_user_author" integer NOT NULL default 0,
|
||||||
fk_user_cloture integer
|
"fk_user_mise_en_service" integer,
|
||||||
|
"fk_user_cloture" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
33
pgsql/tables/llx_contratdet.key.sql
Normal file
33
pgsql/tables/llx_contratdet.key.sql
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
--
|
||||||
|
-- ============================================================================
|
||||||
|
--
|
||||||
|
--
|
||||||
|
ALTER TABLE llx_contratdet ADD INDEX (fk_contrat);
|
||||||
|
ALTER TABLE llx_contratdet ADD INDEX (fk_product);
|
||||||
|
--
|
||||||
|
--
|
||||||
|
ALTER TABLE llx_contratdet ADD FOREIGN KEY (fk_contrat) REFERENCES llx_contrat (rowid);
|
||||||
|
ALTER TABLE llx_contratdet ADD FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
|
||||||
58
pgsql/tables/llx_contratdet.sql
Normal file
58
pgsql/tables/llx_contratdet.sql
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
--
|
||||||
|
-- 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_contratdet
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"tms" timestamp,
|
||||||
|
"fk_contrat" integer NOT NULL,
|
||||||
|
"fk_product" integer NOT NULL,
|
||||||
|
"statut" smallint DEFAULT 0,
|
||||||
|
"label" text, -- libell<6C> du produit
|
||||||
|
"description" text,
|
||||||
|
"date_commande" datetime,
|
||||||
|
"date_ouverture_prevue" datetime,
|
||||||
|
"date_ouverture" datetime, -- date d'ouverture du service chez le client
|
||||||
|
"date_fin_validite" datetime,
|
||||||
|
"date_cloture" datetime,
|
||||||
|
"tva_tx" real DEFAULT 19.6, -- taux tva
|
||||||
|
"qty" real, -- quantit<69>
|
||||||
|
"remise_percent" real DEFAULT 0, -- pourcentage de remise
|
||||||
|
"remise" real DEFAULT 0, -- montant de la remise
|
||||||
|
"subprice" real, -- prix avant remise
|
||||||
|
"price_ht" real, -- prix final
|
||||||
|
"fk_user_author" integer NOT NULL default 0,
|
||||||
|
"fk_user_ouverture" integer,
|
||||||
|
"fk_user_cloture" integer,
|
||||||
|
"commentaire" text
|
||||||
|
);
|
||||||
37
pgsql/tables/llx_contratdet_log.sql
Normal file
37
pgsql/tables/llx_contratdet_log.sql
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
--
|
||||||
|
-- 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_contratdet_log
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"tms" timestamp,
|
||||||
|
"fk_contratdet" integer NOT NULL,
|
||||||
|
"date" datetime,
|
||||||
|
"statut" smallint NOT NULL,
|
||||||
|
"fk_user_author" integer NOT NULL,
|
||||||
|
"commentaire" text
|
||||||
|
);
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,18 +21,16 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_cotisation
|
create table llx_cotisation
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
datec timestamp without time zone,
|
"datec" datetime,
|
||||||
fk_adherent integer,
|
"fk_adherent" integer,
|
||||||
dateadh timestamp without time zone,
|
"dateadh" datetime,
|
||||||
cotisation real,
|
"cotisation" real,
|
||||||
fk_bank integer DEFAULT NULL,
|
"fk_bank" int4 DEFAULT NULL,
|
||||||
note text
|
"note" text
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,14 +26,14 @@
|
|||||||
|
|
||||||
create table llx_deplacement
|
create table llx_deplacement
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
datec timestamp without time zone NOT NULL,
|
"datec" datetime,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
dated timestamp without time zone,
|
"dated" datetime,
|
||||||
fk_user integer NOT NULL,
|
"fk_user" integer NOT NULL,
|
||||||
fk_user_author integer,
|
"fk_user_author" integer,
|
||||||
type smallint NOT NULL,
|
"type" smallint NOT NULL,
|
||||||
km smallint,
|
"km" smallint,
|
||||||
fk_soc integer,
|
"fk_soc" integer,
|
||||||
note text
|
"note" text
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -24,9 +26,9 @@
|
|||||||
|
|
||||||
create table llx_domain
|
create table llx_domain
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
datec timestamp without time zone,
|
"datec" datetime,
|
||||||
label varchar(255),
|
"label" varchar(255),
|
||||||
note text
|
"note" text
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -20,27 +24,26 @@
|
|||||||
--
|
--
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_don
|
create table llx_don
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
fk_statut smallint NOT NULL DEFAULT 0,-- etat du don promesse/valid
|
"fk_statut" smallint NOT NULL DEFAULT 0,-- etat du don promesse/valid
|
||||||
datec timestamp without time zone, -- date de cr<63>ation de l'enregistrement
|
"datec" datetime, -- date de cr<63>ation de l'enregistrement
|
||||||
datedon timestamp without time zone, -- date du don/promesse
|
"datedon" datetime, -- date du don/promesse
|
||||||
amount real DEFAULT 0,
|
"amount" real DEFAULT 0,
|
||||||
fk_paiement integer,
|
"fk_paiement" integer,
|
||||||
prenom varchar(50),
|
"prenom" varchar(50),
|
||||||
nom varchar(50),
|
"nom" varchar(50),
|
||||||
societe varchar(50),
|
"societe" varchar(50),
|
||||||
adresse text,
|
"adresse" text,
|
||||||
cp varchar(30),
|
"cp" varchar(30),
|
||||||
ville varchar(50),
|
"ville" varchar(50),
|
||||||
pays varchar(50),
|
"pays" varchar(50),
|
||||||
email varchar(255),
|
"email" varchar(255),
|
||||||
public smallint DEFAULT 1 NOT NULL, -- le don est-il public (0,1)
|
"public" smallint DEFAULT 1 NOT NULL, -- le don est-il public (0,1)
|
||||||
fk_don_projet integer NOT NULL, -- projet auquel est fait le don
|
"fk_don_projet" integer NOT NULL, -- projet auquel est fait le don
|
||||||
fk_user_author integer NOT NULL,
|
"fk_user_author" integer NOT NULL,
|
||||||
fk_user_valid integer NOT NULL,
|
"fk_user_valid" integer NOT NULL,
|
||||||
note text
|
"note" text
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -20,13 +24,12 @@
|
|||||||
--
|
--
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_don_projet
|
create table llx_don_projet
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
datec timestamp without time zone,
|
"datec" datetime,
|
||||||
libelle varchar(255),
|
"libelle" varchar(255),
|
||||||
fk_user_author integer NOT NULL,
|
"fk_user_author" integer NOT NULL,
|
||||||
note text
|
"note" text
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,10 +26,10 @@
|
|||||||
|
|
||||||
create table llx_editeur
|
create table llx_editeur
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
oscid integer NOT NULL,
|
"oscid" integer NOT NULL,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
nom varchar(255),
|
"nom" varchar(255),
|
||||||
fk_user_author integer
|
"fk_user_author" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,12 +27,12 @@
|
|||||||
|
|
||||||
create table llx_entrepot
|
create table llx_entrepot
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
datec timestamp without time zone,
|
"datec" datetime,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
label varchar(255) NOT NULL,
|
"label" varchar(255) NOT NULL,
|
||||||
description text,
|
"description" text,
|
||||||
statut smallint DEFAULT 1, -- 1 ouvert, 0 ferm<72>
|
"statut" tinyint DEFAULT 1, -- 1 ouvert, 0 ferm<72>
|
||||||
fk_user_author integer
|
"fk_user_author" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,26 +24,24 @@
|
|||||||
--
|
--
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_expedition
|
create table llx_expedition
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
ref varchar(30) NOT NULL,
|
"ref" varchar(30) NOT NULL,
|
||||||
fk_commande integer,
|
"fk_commande" integer,
|
||||||
date_creation timestamp without time zone, -- date de creation
|
"date_creation" datetime, -- date de creation
|
||||||
date_valid timestamp without time zone, -- date de validation
|
"date_valid" datetime, -- date de validation
|
||||||
date_expedition date, -- date de l'expedition
|
"date_expedition" date, -- date de l'expedition
|
||||||
fk_user_author integer, -- createur
|
"fk_user_author" integer, -- createur
|
||||||
fk_user_valid integer, -- valideur
|
"fk_user_valid" integer, -- valideur
|
||||||
fk_entrepot integer,
|
"fk_entrepot" integer,
|
||||||
fk_expedition_methode integer,
|
"fk_expedition_methode" integer,
|
||||||
fk_statut smallint DEFAULT 0,
|
"fk_statut" smallint DEFAULT 0,
|
||||||
note text,
|
"note" text,
|
||||||
model_pdf varchar(50),
|
"model_pdf" varchar(50),
|
||||||
|
4294967294);
|
||||||
|
|
||||||
UNIQUE (ref)
|
CREATE INDEX llx_expedition_fk_expedition_methode ON llx_expedition (fk_expedition_methode);
|
||||||
);
|
CREATE INDEX llx_expedition_fk_commande ON llx_expedition (fk_commande);
|
||||||
|
|
||||||
CREATE INDEX llx_expedition_fk_expedition_methode ON llx_expedition(fk_expedition_methode);
|
|
||||||
|
|
||||||
CREATE INDEX llx_expedition_fk_commande ON llx_expedition(fk_commande);
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -24,9 +27,9 @@
|
|||||||
create table llx_expedition_methode
|
create table llx_expedition_methode
|
||||||
(
|
(
|
||||||
rowid integer PRIMARY KEY,
|
rowid integer PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
code varchar(30) NOT NULL,
|
"code" varchar(30) NOT NULL,
|
||||||
libelle varchar(50) NOT NULL,
|
"libelle" varchar(50) NOT NULL,
|
||||||
description text,
|
"description" text,
|
||||||
statut smallint DEFAULT 0
|
"statut" tinyint DEFAULT 0
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,17 +21,16 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_expeditiondet
|
create table llx_expeditiondet
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_expedition integer NOT NULL,
|
"fk_expedition" integer NOT NULL,
|
||||||
fk_commande_ligne integer NOT NULL,
|
"fk_commande_ligne" integer NOT NULL,
|
||||||
qty real -- quantit<69>
|
"qty" real, -- quantit<69>
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX llx_expeditiondet_fk_expedition ON llx_expeditiondet(fk_expedition);
|
CREATE INDEX llx_expeditiondet_fk_expedition ON llx_expeditiondet (fk_expedition);
|
||||||
|
CREATE INDEX llx_expeditiondet_fk_commande_ligne ON llx_expeditiondet (fk_commande_ligne);
|
||||||
CREATE INDEX llx_expeditiondet_fk_commande_ligne ON llx_expeditiondet(fk_commande_ligne);
|
|
||||||
|
|||||||
36
pgsql/tables/llx_export_compta.sql
Normal file
36
pgsql/tables/llx_export_compta.sql
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
-- ===================================================================
|
||||||
|
--
|
||||||
|
-- $Revision$
|
||||||
|
|
||||||
|
|
||||||
|
create table llx_export_compta
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"ref" varchar(12) NOT NULL,
|
||||||
|
"date_export" datetime, -- date de creation
|
||||||
|
"fk_user" integer NOT NULL,
|
||||||
|
"note" text
|
||||||
|
);
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,12 +21,11 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
create table llx_fa_pr
|
create table llx_fa_pr
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_facture integer,
|
"fk_facture" integer,
|
||||||
fk_propal integer
|
"fk_propal" integer
|
||||||
);
|
);
|
||||||
|
|||||||
36
pgsql/tables/llx_facture.key.sql
Normal file
36
pgsql/tables/llx_facture.key.sql
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
--
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture ADD INDEX (fk_soc);
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture ADD INDEX (fk_user_author);
|
||||||
|
ALTER TABLE llx_facture ADD INDEX (fk_user_valid);
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture ADD FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||||
|
ALTER TABLE llx_facture ADD FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,34 +21,33 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_facture
|
create table llx_facture
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
facnumber varchar(50) NOT NULL,
|
"facnumber" varchar(50) NOT NULL,
|
||||||
fk_soc integer NOT NULL,
|
"increment" varchar(10),
|
||||||
datec timestamp without time zone, -- date de creation de la facture
|
"fk_soc" integer NOT NULL,
|
||||||
datef date, -- date de la facture
|
"datec" datetime, -- date de creation de la facture
|
||||||
paye smallint DEFAULT 0 NOT NULL,
|
"datef" date, -- date de la facture
|
||||||
amount real DEFAULT 0 NOT NULL,
|
"paye" smallint DEFAULT 0 NOT NULL,
|
||||||
remise real DEFAULT 0,
|
"amount" real DEFAULT 0 NOT NULL,
|
||||||
remise_percent real DEFAULT 0,
|
"remise" real DEFAULT 0,
|
||||||
tva real DEFAULT 0,
|
"remise_percent" real DEFAULT 0,
|
||||||
total real DEFAULT 0,
|
"tva" real DEFAULT 0,
|
||||||
total_ttc real DEFAULT 0,
|
"total" real DEFAULT 0,
|
||||||
fk_statut smallint DEFAULT 0 NOT NULL,
|
"total_ttc" real DEFAULT 0,
|
||||||
author varchar(50),
|
"fk_statut" smallint DEFAULT 0 NOT NULL,
|
||||||
fk_user integer, -- createur de la facture
|
"author" varchar(50),
|
||||||
fk_user_author integer, -- createur de la propale
|
"fk_user" integer, -- createur de la facture
|
||||||
fk_user_valid integer, -- valideur de la propale
|
"fk_user_author" integer, -- createur de la propale
|
||||||
fk_projet integer, -- projet auquel est associ<63> la facture
|
"fk_user_valid" integer, -- valideur de la propale
|
||||||
fk_cond_reglement integer, -- condition de reglement
|
"fk_projet" integer, -- projet auquel est associ<63> la facture
|
||||||
date_lim_reglement date, -- date limite de reglement
|
"fk_cond_reglement" integer, -- condition de reglement (30 jours, fin de mois ...)
|
||||||
note text
|
"fk_mode_reglement" integer, -- mode de reglement (Virement, Pr<50>l<EFBFBD>vement)
|
||||||
|
"date_lim_reglement" date, -- date limite de reglement
|
||||||
|
"note" text,
|
||||||
|
4294967294 "INDEX" fksoc (fk_soc)
|
||||||
);
|
);
|
||||||
|
|
||||||
create unique index llx_facture_facnumber on llx_facture(facnumber);
|
|
||||||
|
|
||||||
create index llx_facture_fksoc on llx_facture(fk_soc);
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,28 +24,28 @@
|
|||||||
--
|
--
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table llx_facture_fourn
|
create table llx_facture_fourn
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
facnumber varchar(50) NOT NULL,
|
"facnumber" varchar(50) NOT NULL,
|
||||||
fk_soc integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
datec timestamp without time zone, -- date de creation de la facture
|
"datec" datetime, -- date de creation de la facture
|
||||||
datef date, -- date de la facture
|
"datef" date, -- date de la facture
|
||||||
libelle varchar(255),
|
"libelle" varchar(255),
|
||||||
paye smallint DEFAULT 0 NOT NULL,
|
"paye" smallint DEFAULT 0 NOT NULL,
|
||||||
amount real DEFAULT 0 NOT NULL,
|
"amount" real DEFAULT 0 NOT NULL,
|
||||||
remise real DEFAULT 0,
|
"remise" real DEFAULT 0,
|
||||||
tva real DEFAULT 0,
|
"tva" real DEFAULT 0,
|
||||||
total real DEFAULT 0,
|
"total" real DEFAULT 0,
|
||||||
total_ht real DEFAULT 0,
|
"total_ht" real DEFAULT 0,
|
||||||
total_tva real DEFAULT 0,
|
"total_tva" real DEFAULT 0,
|
||||||
total_ttc real DEFAULT 0,
|
"total_ttc" real DEFAULT 0,
|
||||||
|
"fk_statut" smallint DEFAULT 0 NOT NULL,
|
||||||
fk_statut smallint DEFAULT 0 NOT NULL,
|
"fk_user_author" integer, -- createur de la facture
|
||||||
|
"fk_user_valid" integer, -- valideur de la facture
|
||||||
fk_user_author integer, -- createur de la propale
|
"note" text
|
||||||
fk_user_valid integer, -- valideur de la propale
|
|
||||||
note text
|
|
||||||
);
|
);
|
||||||
|
|
||||||
create unique index llx_facture_fourn_facnumber on llx_facture_fourn(facnumber, fk_soc);
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,19 +21,19 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_facture_fourn_det
|
create table llx_facture_fourn_det
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_facture_fourn integer NOT NULL,
|
"fk_facture_fourn" integer NOT NULL,
|
||||||
fk_product integer NULL,
|
"fk_product" integer NULL,
|
||||||
description text,
|
"description" text,
|
||||||
pu_ht real DEFAULT 0,
|
"pu_ht" real DEFAULT 0,
|
||||||
qty smallint DEFAULT 1,
|
"qty" smallint DEFAULT 1,
|
||||||
total_ht real DEFAULT 0,
|
"total_ht" real DEFAULT 0,
|
||||||
tva_taux real DEFAULT 0,
|
"tva_taux" real DEFAULT 0,
|
||||||
tva real DEFAULT 0,
|
"tva" real DEFAULT 0,
|
||||||
total_ttc real DEFAULT 0
|
"total_ttc" real DEFAULT 0
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,28 +21,27 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table llx_facture_rec
|
create table llx_facture_rec
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
titre varchar(50) NOT NULL,
|
"titre" varchar(50) NOT NULL,
|
||||||
fk_soc integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
datec timestamp without time zone, -- date de creation
|
"datec" datetime, -- date de creation
|
||||||
|
"amount" real DEFAULT 0 NOT NULL,
|
||||||
amount real DEFAULT 0 NOT NULL,
|
"remise" real DEFAULT 0,
|
||||||
remise real DEFAULT 0,
|
"remise_percent" real DEFAULT 0,
|
||||||
remise_percent real DEFAULT 0,
|
"tva" real DEFAULT 0,
|
||||||
tva real DEFAULT 0,
|
"total" real DEFAULT 0,
|
||||||
total real DEFAULT 0,
|
"total_ttc" real DEFAULT 0,
|
||||||
total_ttc real DEFAULT 0,
|
"fk_user_author" integer, -- createur
|
||||||
|
"fk_projet" integer, -- projet auquel est associ<63> la facture
|
||||||
fk_user_author integer, -- createur
|
"fk_cond_reglement" integer, -- condition de reglement
|
||||||
fk_projet integer, -- projet auquel est associ<63> la facture
|
"note" text,
|
||||||
fk_cond_reglement integer, -- condition de reglement
|
"INDEX" fksoc (fk_soc)
|
||||||
|
|
||||||
note text
|
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX llx_facture_rec_fksoc ON llx_facture_rec (fk_soc);
|
|
||||||
|
|||||||
29
pgsql/tables/llx_facture_tva_sum.key.sql
Normal file
29
pgsql/tables/llx_facture_tva_sum.key.sql
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
-- Supprimme orhpelins pour permettre mont<6E>e de la cl<63>
|
||||||
|
DELETE llx_facture_tva_sum FROM llx_facture_tva_sum LEFT JOIN llx_facture ON llx_facture_tva_sum.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture_tva_sum ADD CONSTRAINT facture_tva_sum_fk_facture_rowid FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid);
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,14 +21,13 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_facture_tva_sum
|
create table llx_facture_tva_sum
|
||||||
(
|
(
|
||||||
fk_facture integer NOT NULL,
|
"fk_facture" integer NOT NULL,
|
||||||
amount real NOT NULL,
|
"amount" real NOT NULL,
|
||||||
tva_tx real NOT NULL
|
"tva_tx" real NOT NULL,
|
||||||
|
KEY(fk_facture)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX llx_facture_tva_sum_fk_facture ON llx_facture_tva_sum (fk_facture);
|
|
||||||
|
|||||||
29
pgsql/tables/llx_facturedet.key.sql
Normal file
29
pgsql/tables/llx_facturedet.key.sql
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
-- Supprimme orhpelins pour permettre mont<6E>e de la cl<63>
|
||||||
|
DELETE llx_facturedet FROM llx_facturedet LEFT JOIN llx_facture ON llx_facturedet.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_facturedet ADD CONSTRAINT facturedet_fk_facture_rowid FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid);
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,23 +22,23 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_facturedet
|
create table llx_facturedet
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_facture integer NOT NULL,
|
"fk_facture" integer NOT NULL,
|
||||||
fk_product integer DEFAULT 0 NOT NULL,
|
"fk_product" integer DEFAULT 0 NOT NULL,
|
||||||
description text,
|
"description" text,
|
||||||
tva_taux real DEFAULT 19.6, -- taux tva
|
"tva_taux" real DEFAULT 19.6, -- taux tva
|
||||||
qty real, -- quantit<69>
|
"qty" real, -- quantit<69>
|
||||||
remise_percent real DEFAULT 0, -- pourcentage de remise
|
"remise_percent" real DEFAULT 0, -- pourcentage de remise
|
||||||
remise real DEFAULT 0, -- montant de la remise
|
"remise" real DEFAULT 0, -- montant de la remise
|
||||||
subprice real, -- prix avant remise
|
"subprice" real, -- prix avant remise
|
||||||
price real, -- prix final
|
"price" real, -- prix final
|
||||||
date_start timestamp without time zone, -- date debut si service
|
"date_start" datetime, -- date debut si service
|
||||||
date_end timestamp without time zone -- date fin si service
|
"date_end" datetime, -- date fin si service
|
||||||
|
"fk_code_ventilation" integer DEFAULT 0 NOT NULL,
|
||||||
|
"fk_export_compta" integer DEFAULT 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX llx_facturedet_fk_facture ON llx_facturedet (fk_facture);
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,19 +21,18 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
create table llx_facturedet_rec
|
create table llx_facturedet_rec
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_facture integer NOT NULL,
|
"fk_facture" integer NOT NULL,
|
||||||
fk_product integer,
|
"fk_product" integer,
|
||||||
description text,
|
"description" text,
|
||||||
tva_taux real DEFAULT 19.6, -- taux tva
|
"tva_taux" real DEFAULT 19.6, -- taux tva
|
||||||
qty real, -- quantit<69>
|
"qty" real, -- quantit<69>
|
||||||
remise_percent real DEFAULT 0, -- pourcentage de remise
|
"remise_percent" real DEFAULT 0, -- pourcentage de remise
|
||||||
remise real DEFAULT 0, -- montant de la remise
|
"remise" real DEFAULT 0, -- montant de la remise
|
||||||
subprice real, -- prix avant remise
|
"subprice" real, -- prix avant remise
|
||||||
price real -- prix final
|
"price" real -- prix final
|
||||||
);
|
);
|
||||||
|
|||||||
27
pgsql/tables/llx_fichinter.key.sql
Normal file
27
pgsql/tables/llx_fichinter.key.sql
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
--
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
ALTER TABLE llx_fichinter ADD CONSTRAINT fichinter_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2002-2003 <20>ric Seigne <erics@rycks.com>
|
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,21 +24,19 @@
|
|||||||
--
|
--
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_fichinter
|
create table llx_fichinter
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_soc integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
fk_projet integer DEFAULT 0, -- projet auquel est rattache la fiche
|
"fk_projet" integer DEFAULT 0, -- projet auquel est rattache la fiche
|
||||||
ref varchar(30) NOT NULL, -- number
|
"ref" varchar(30) NOT NULL, -- number
|
||||||
datec timestamp without time zone, -- date de creation
|
"datec" datetime, -- date de creation
|
||||||
date_valid timestamp without time zone, -- date de validation
|
"date_valid" datetime, -- date de validation
|
||||||
datei date, -- date de l'intervention
|
"datei" date, -- date de l'intervention
|
||||||
fk_user_author integer, -- createur de la fiche
|
"fk_user_author" integer, -- createur de la fiche
|
||||||
fk_user_valid integer, -- valideur de la fiche
|
"fk_user_valid" integer, -- valideur de la fiche
|
||||||
fk_statut smallint DEFAULT 0,
|
"fk_statut" smallint DEFAULT 0,
|
||||||
duree real,
|
"duree" real,
|
||||||
note text
|
"note" text,
|
||||||
);
|
4294967294);
|
||||||
|
|
||||||
CREATE UNIQUE INDEX llx_fichinter_ref ON llx_fichinter(ref);
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,12 +26,12 @@
|
|||||||
|
|
||||||
create table llx_groupart
|
create table llx_groupart
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
osc_id integer NOT NULL,
|
"osc_id" integer NOT NULL,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
nom varchar(64),
|
"nom" varchar(64),
|
||||||
groupart CHAR(8) CHECK (groupart IN ('artiste','groupe')) NOT NULL,
|
"groupart" varchar(7) CHECK (groupart IN ("artiste","groupe")) NOT NULL,
|
||||||
description text NOT NULL,
|
"description" text NOT NULL,
|
||||||
fk_user_author integer
|
"fk_user_author" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2000-2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,16 +24,15 @@
|
|||||||
--
|
--
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_groupesociete
|
create table llx_groupesociete
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
parent integer UNIQUE,
|
"tms" timestamp,
|
||||||
tms timestamp,
|
"datec" datetime, -- creation date
|
||||||
datec timestamp without time zone, -- creation date
|
"nom" varchar(60), -- company name
|
||||||
nom varchar(60), -- company name
|
"note" text, --
|
||||||
note text, --
|
"remise" real DEFAULT 0, -- remise syst<73>matique pour le client
|
||||||
remise real DEFAULT 0, -- remise syst<73>matique pour le client
|
"fk_user_author" integer
|
||||||
fk_user_author integer
|
);
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2000-2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,15 +26,15 @@
|
|||||||
--
|
--
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_groupesociete_remise
|
create table llx_groupesociete_remise
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_groupe integer NOT NULL,
|
"fk_groupe" integer NOT NULL,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
datec timestamp without time zone, -- creation date
|
"datec" datetime, -- creation date
|
||||||
fk_user_author integer, -- utilisateur qui a cr<63><72> l'info
|
"fk_user_author" integer, -- utilisateur qui a cr<63><72> l'info
|
||||||
remise real DEFAULT 0, -- remise syst<73>matique pour le client
|
"remise" real DEFAULT 0, -- remise syst<73>matique pour le client
|
||||||
note text
|
"note" text
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,11 +26,11 @@
|
|||||||
|
|
||||||
create table llx_lieu_concert
|
create table llx_lieu_concert
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
nom varchar(64) NOT NULL,
|
"nom" varchar(64) NOT NULL,
|
||||||
description text,
|
"description" text,
|
||||||
ville varchar(64) NOT NULL,
|
"ville" varchar(64) NOT NULL,
|
||||||
fk_user_author integer
|
"fk_user_author" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,25 +24,21 @@
|
|||||||
--
|
--
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_livre
|
create table llx_livre
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
oscid integer NOT NULL,
|
"oscid" integer NOT NULL,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
status smallint,
|
"status" tinyint,
|
||||||
date_ajout timestamp without time zone,
|
"date_ajout" datetime,
|
||||||
ref varchar(12),
|
"ref" varchar(12),
|
||||||
title varchar(64),
|
"title" varchar(64),
|
||||||
annee smallint,
|
"annee" int2,
|
||||||
description text,
|
"description" text,
|
||||||
prix decimal(15,4),
|
"prix" decimal(15,4),
|
||||||
fk_editeur integer,
|
"fk_editeur" integer,
|
||||||
fk_user_author integer,
|
"fk_user_author" integer,
|
||||||
frais_de_port smallint DEFAULT 1,
|
"frais_de_port" tinyint DEFAULT 1
|
||||||
|
|
||||||
UNIQUE(ref)
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,11 +24,9 @@
|
|||||||
--
|
--
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_livre_to_auteur
|
create table llx_livre_to_auteur
|
||||||
(
|
(
|
||||||
fk_livre integer NOT NULL,
|
"fk_livre" integer NOT NULL,
|
||||||
fk_auteur integer NOT NULL,
|
"fk_auteur" integer NOT NULL
|
||||||
|
|
||||||
UNIQUE(fk_livre, fk_auteur)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
59
pgsql/tables/llx_mailing.sql
Normal file
59
pgsql/tables/llx_mailing.sql
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ========================================================================
|
||||||
|
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
--
|
||||||
|
-- ========================================================================
|
||||||
|
--
|
||||||
|
-- redaction : 0
|
||||||
|
-- valide : 1
|
||||||
|
-- approuv<75> : 2
|
||||||
|
-- envoye : 3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
create table llx_mailing
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"statut" smallint DEFAULT 0, --
|
||||||
|
"date_envoi" datetime, -- date d'envoi
|
||||||
|
"titre" varchar(60), -- company name
|
||||||
|
"sujet" varchar(60), -- company name
|
||||||
|
"body" text,
|
||||||
|
"cible" varchar(60),
|
||||||
|
"nbemail" integer,
|
||||||
|
"email_from" varchar(160), -- company name
|
||||||
|
"email_replyto" varchar(160), -- company name
|
||||||
|
"email_errorsto" varchar(160), -- company name
|
||||||
|
"date_creat" datetime, -- creation date
|
||||||
|
"date_valid" datetime, -- creation date
|
||||||
|
"date_appro" datetime, -- creation date
|
||||||
|
"fk_user_creat" integer, -- utilisateur qui a cr<63><72> l'info
|
||||||
|
"fk_user_valid" integer, -- utilisateur qui a cr<63><72> l'info
|
||||||
|
"fk_user_appro" integer -- utilisateur qui a cr<63><72> l'info
|
||||||
|
);
|
||||||
|
|
||||||
28
pgsql/tables/llx_mailing_cibles.key.sql
Normal file
28
pgsql/tables/llx_mailing_cibles.key.sql
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
--
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_mailing_cibles ADD UNIQUE uk_mailing_cibles (fk_mailing, email);
|
||||||
39
pgsql/tables/llx_mailing_cibles.sql
Normal file
39
pgsql/tables/llx_mailing_cibles.sql
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ========================================================================
|
||||||
|
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
--
|
||||||
|
-- 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_mailing_cibles
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"fk_mailing" integer NOT NULL,
|
||||||
|
"fk_contact" integer NOT NULL,
|
||||||
|
"nom" varchar(160),
|
||||||
|
"prenom" varchar(160),
|
||||||
|
"email" varchar(160) NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
36
pgsql/tables/llx_models.sql
Normal file
36
pgsql/tables/llx_models.sql
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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_models
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"tms" timestamp,
|
||||||
|
"type" varchar(32), -- Fonction destinee au modele
|
||||||
|
"public" smallint DEFAULT 1 NOT NULL, -- Model publique ou privee
|
||||||
|
"fk_user" integer, -- Id utilisateur si privee, sinon null
|
||||||
|
"title" varchar(128), -- Titre modele
|
||||||
|
"content" text -- Texte du modele
|
||||||
|
);
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,23 +26,24 @@
|
|||||||
|
|
||||||
create table llx_newsletter
|
create table llx_newsletter
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
datec timestamp without time zone,
|
"datec" datetime,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
email_subject varchar(32) NOT NULL,
|
"email_subject" varchar(32) NOT NULL,
|
||||||
email_from_name varchar(255) NOT NULL,
|
"email_from_name" varchar(255) NOT NULL,
|
||||||
email_from_email varchar(255) NOT NULL,
|
"email_from_email" varchar(255) NOT NULL,
|
||||||
email_replyto varchar(255) NOT NULL,
|
"email_replyto" varchar(255) NOT NULL,
|
||||||
email_body text,
|
"email_body" text,
|
||||||
target smallint,
|
"target" smallint,
|
||||||
sql_target text,
|
"sql_target" text,
|
||||||
status smallint DEFAULT 0 NOT NULL,
|
"status" smallint DEFAULT 0 NOT NULL,
|
||||||
date_send_request timestamp without time zone, -- debut de l'envoi demand<6E>
|
"date_send_request" datetime, -- debut de l'envoi demand<6E>
|
||||||
date_send_begin timestamp without time zone, -- debut de l'envoi
|
"date_send_begin" datetime, -- debut de l'envoi
|
||||||
date_send_end timestamp without time zone, -- fin de l'envoi
|
"date_send_end" datetime, -- fin de l'envoi
|
||||||
nbsent integer, -- nombre de mails envoy<6F>s
|
"nbsent" integer, -- nombre de mails envoy<6F>s
|
||||||
nberror integer, -- nombre de mails envoy<6F>s
|
"nberror" integer, -- nombre de mails envoy<6F>s
|
||||||
fk_user_author integer,
|
"fk_user_author" integer,
|
||||||
fk_user_valid integer,
|
"fk_user_valid" integer,
|
||||||
fk_user_modif integer
|
"fk_user_modif" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,11 +26,11 @@
|
|||||||
|
|
||||||
create table llx_notify
|
create table llx_notify
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
daten timestamp without time zone, -- date de la notification
|
"daten" datetime, -- date de la notification
|
||||||
fk_action integer NOT NULL,
|
"fk_action" integer NOT NULL,
|
||||||
fk_contact integer NOT NULL,
|
"fk_contact" integer NOT NULL,
|
||||||
objet_type CHAR(10) CHECK (objet_type IN ('ficheinter','facture','propale')),
|
"objet_type" varchar(10) CHECK (objet_type IN ('ficheinter','facture','propale')) ,
|
||||||
objet_id integer NOT NULL
|
"objet_id" integer NOT NULL
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,10 +26,10 @@
|
|||||||
|
|
||||||
create table llx_notify_def
|
create table llx_notify_def
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
datec date, -- date de creation
|
"datec" date, -- date de creation
|
||||||
fk_action integer NOT NULL,
|
"fk_action" integer NOT NULL,
|
||||||
fk_soc integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
fk_contact integer NOT NULL
|
"fk_contact" integer NOT NULL
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,22 +22,28 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- Satut, 0 ou 1, 1 n'est plus supprimable
|
||||||
|
-- fk_export_compta 0 pas export<72>
|
||||||
|
|
||||||
|
|
||||||
create table llx_paiement
|
create table llx_paiement
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_facture integer,
|
"fk_facture" integer,
|
||||||
datec timestamp without time zone, -- date de creation
|
"datec" datetime, -- date de creation
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
datep timestamp without time zone, -- payment date
|
"datep" datetime, -- payment date
|
||||||
amount real DEFAULT 0,
|
"amount" real DEFAULT 0,
|
||||||
author varchar(50),
|
"author" varchar(50),
|
||||||
fk_paiement integer NOT NULL,
|
"fk_paiement" integer NOT NULL,
|
||||||
num_paiement varchar(50),
|
"num_paiement" varchar(50),
|
||||||
note text,
|
"note" text,
|
||||||
fk_bank integer NOT NULL,
|
"fk_bank" integer NOT NULL,
|
||||||
fk_user_creat integer, -- utilisateur qui a cr<63><72> l'info
|
"fk_user_creat" integer, -- utilisateur qui a cr<63><72> l'info
|
||||||
fk_user_modif integer -- utilisateur qui a modifi<66> l'info
|
"fk_user_modif" integer, -- utilisateur qui a modifi<66> l'info
|
||||||
|
"statut" smallint DEFAULT 0 NOT NULL,
|
||||||
|
"fk_export_compta" integer DEFAULT 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|||||||
32
pgsql/tables/llx_paiement_facture.key.sql
Normal file
32
pgsql/tables/llx_paiement_facture.key.sql
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
--
|
||||||
|
-- ===========================================================================
|
||||||
|
|
||||||
|
-- Supprimme orhpelins pour permettre mont<6E>e de la cl<63>
|
||||||
|
DELETE llx_paiement_facture FROM llx_paiement_facture LEFT JOIN llx_facture ON llx_paiement_facture.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL;
|
||||||
|
DELETE llx_paiement_facture FROM llx_paiement_facture LEFT JOIn llx_paiement ON llx_paiement_facture.fk_facture = llx_paiement.rowid WHERE llx_paiement.rowid IS NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_paiement_facture ADD CONSTRAINT paiement_facture_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid);
|
||||||
|
ALTER TABLE llx_paiement_facture ADD CONSTRAINT paiement_facture_fk_paiement FOREIGN KEY (fk_paiement) REFERENCES llx_paiement (rowid);
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,17 +21,16 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_paiement_facture
|
create table llx_paiement_facture
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_paiement integer,
|
"fk_paiement" integer,
|
||||||
fk_facture integer,
|
"fk_facture" integer,
|
||||||
amount real DEFAULT 0
|
"amount" real DEFAULT 0,
|
||||||
|
|
||||||
|
key (fk_paiement),
|
||||||
|
key (fk_facture)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX llx_paiement_facture_fk_paiement ON llx_paiement_facture(fk_paiement);
|
|
||||||
|
|
||||||
CREATE INDEX llx_paiement_facture_fk_facture ON llx_paiement_facture(fk_facture);
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,22 +21,21 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_paiementcharge
|
create table llx_paiementcharge
|
||||||
(
|
(
|
||||||
rowid serial PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
fk_charge integer,
|
"fk_charge" integer,
|
||||||
datec timestamp without time zone, -- date de creation
|
"datec" datetime, -- date de creation
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
datep timestamp without time zone, -- payment date
|
"datep" datetime, -- payment date
|
||||||
amount real DEFAULT 0,
|
"amount" real DEFAULT 0,
|
||||||
fk_typepaiement integer NOT NULL,
|
"fk_typepaiement" integer NOT NULL,
|
||||||
num_paiement varchar(50),
|
"num_paiement" varchar(50),
|
||||||
note text,
|
"note" text,
|
||||||
fk_bank integer NOT NULL,
|
"fk_bank" integer NOT NULL,
|
||||||
fk_user_creat integer, -- utilisateur qui a cr<63><72> l'info
|
"fk_user_creat" integer, -- utilisateur qui a cr<63><72> l'info
|
||||||
fk_user_modif integer -- utilisateur qui a modifi<66> l'info
|
"fk_user_modif" integer -- utilisateur qui a modifi<66> l'info
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,20 +22,19 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
create table llx_paiementfourn
|
create table llx_paiementfourn
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
tms timestamp,
|
"tms" timestamp,
|
||||||
datec timestamp without time zone, -- date de creation de l'enregistrement
|
"datec" datetime, -- date de creation de l'enregistrement
|
||||||
fk_facture_fourn integer, -- facture
|
"fk_facture_fourn" integer, -- facture
|
||||||
datep timestamp without time zone, -- date de paiement
|
"datep" datetime, -- date de paiement
|
||||||
amount real DEFAULT 0, -- montant
|
"amount" real DEFAULT 0, -- montant
|
||||||
fk_user_author integer, -- auteur
|
"fk_user_author" integer, -- auteur
|
||||||
fk_paiement integer NOT NULL, -- moyen de paiement
|
"fk_paiement" integer NOT NULL, -- moyen de paiement
|
||||||
num_paiement varchar(50), -- num<75>ro de paiement (cheque)
|
"num_paiement" varchar(50), -- num<75>ro de paiement (cheque)
|
||||||
note text,
|
"note" text,
|
||||||
fk_bank integer NOT NULL
|
"fk_bank" integer NOT NULL
|
||||||
);
|
);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user