]> git.agnieray.net Git - galette.git/blob - tests/pgsql_06.sql
Bump version, update changelog
[galette.git] / tests / pgsql_06.sql
1 DROP SEQUENCE adherents_id_seq;
2 CREATE SEQUENCE adherents_id_seq
3 START 1
4 INCREMENT 1
5 MAXVALUE 2147483647
6 MINVALUE 1
7 CACHE 1;
8
9 DROP SEQUENCE cotisations_id_seq;
10 CREATE SEQUENCE cotisations_id_seq
11 START 1
12 INCREMENT 1
13 MAXVALUE 2147483647
14 MINVALUE 1
15 CACHE 1;
16
17 DROP TABLE adherents;
18 CREATE TABLE adherents (
19 id_adh integer DEFAULT nextval('adherents_id_seq'::text) NOT NULL,
20 id_statut integer DEFAULT '4' NOT NULL,
21 nom_adh character varying(20) DEFAULT '' NOT NULL,
22 prenom_adh character varying(20) DEFAULT NULL,
23 pseudo_adh character varying(20) DEFAULT NULL,
24 titre_adh smallint DEFAULT '0' NOT NULL,
25 ddn_adh date,
26 adresse_adh character varying(150) DEFAULT '' NOT NULL,
27 adresse2_adh character varying(150) DEFAULT NULL,
28 cp_adh character varying(10) DEFAULT '' NOT NULL,
29 ville_adh character varying(50) DEFAULT '' NOT NULL,
30 pays_adh character varying(50) DEFAULT NULL,
31 tel_adh character varying(20),
32 gsm_adh character varying(20),
33 email_adh character varying(150),
34 url_adh character varying(200),
35 icq_adh character varying(20),
36 msn_adh character varying(150),
37 jabber_adh character varying(150),
38 info_adh text,
39 info_public_adh text,
40 prof_adh character varying(150),
41 login_adh character varying(20) DEFAULT '' NOT NULL,
42 mdp_adh character varying(20) DEFAULT '' NOT NULL,
43 date_crea_adh date NOT NULL,
44 activite_adh character(1) DEFAULT '0' NOT NULL,
45 bool_admin_adh character(1) DEFAULT NULL,
46 bool_exempt_adh character(1) DEFAULT NULL,
47 bool_display_info character(1) DEFAULT NULL,
48 date_echeance date
49 );
50
51 DROP TABLE cotisations;
52 CREATE TABLE cotisations (
53 id_cotis integer DEFAULT nextval('cotisations_id_seq'::text) NOT NULL,
54 id_adh integer DEFAULT '0' NOT NULL,
55 id_type_cotis integer DEFAULT '0' NOT NULL,
56 montant_cotis real DEFAULT '0',
57 info_cotis text,
58 duree_mois_cotis smallint DEFAULT '12' NOT NULL,
59 date_cotis date NOT NULL
60 );
61
62 DROP TABLE statuts;
63 CREATE TABLE statuts (
64 id_statut integer NOT NULL,
65 libelle_statut character varying(20) DEFAULT '' NOT NULL,
66 priorite_statut smallint DEFAULT '0' NOT NULL
67 );
68
69 INSERT INTO statuts VALUES (1,'Président',0);
70 INSERT INTO statuts VALUES (2,'Trésorier',10);
71 INSERT INTO statuts VALUES (4,'Membre actif',30);
72 INSERT INTO statuts VALUES (5,'Membre bienfaiteur',40);
73 INSERT INTO statuts VALUES (6,'Membre fondateur',50);
74 INSERT INTO statuts VALUES (3,'Secrétaire',20);
75 INSERT INTO statuts VALUES (7,'Ancien',60);
76 INSERT INTO statuts VALUES (8,'Personne morale',70);
77 INSERT INTO statuts VALUES (9,'Non membre',80);
78 INSERT INTO statuts VALUES (10,'Vice-président',5);
79
80 DROP TABLE types_cotisation;
81 CREATE TABLE types_cotisation (
82 id_type_cotis integer NOT NULL,
83 libelle_type_cotis character varying(30) DEFAULT '' NOT NULL
84 );
85
86 INSERT INTO types_cotisation VALUES (1,'Cotisation annuelle normale');
87 INSERT INTO types_cotisation VALUES (2,'Cotisation annuelle réduite');
88 INSERT INTO types_cotisation VALUES (3,'Cotisation entreprise');
89 INSERT INTO types_cotisation VALUES (4,'Donation en nature');
90 INSERT INTO types_cotisation VALUES (5,'Donation pécunière');
91 INSERT INTO types_cotisation VALUES (6,'Partenariat');
92
93 DROP TABLE preferences;
94 CREATE TABLE preferences (
95 pref_nom character varying(40) DEFAULT '' NOT NULL,
96 pref_adresse character varying(150) DEFAULT '' NOT NULL,
97 pref_adresse2 character varying(150) DEFAULT NULL,
98 pref_cp character varying(10) DEFAULT '' NOT NULL,
99 pref_ville character varying(50) DEFAULT '' NOT NULL,
100 pref_pays character varying(50) DEFAULT NULL,
101 pref_lang character varying(20) DEFAULT '' NOT NULL,
102 pref_numrows integer DEFAULT '30' NOT NULL,
103 pref_log character(1) DEFAULT '1' NOT NULL,
104 pref_email_nom character varying(20) DEFAULT '' NOT NULL,
105 pref_email character varying(150) DEFAULT '' NOT NULL,
106 pref_etiq_marges integer DEFAULT '0' NOT NULL,
107 pref_etiq_hspace integer DEFAULT '0' NOT NULL,
108 pref_etiq_vspace integer DEFAULT '0' NOT NULL,
109 pref_etiq_hsize integer DEFAULT '0' NOT NULL,
110 pref_etiq_vsize integer DEFAULT '0' NOT NULL,
111 pref_etiq_cols integer DEFAULT '0' NOT NULL,
112 pref_etiq_rows integer DEFAULT '0' NOT NULL,
113 pref_etiq_corps integer DEFAULT '0' NOT NULL,
114 pref_admin_login character varying(20) DEFAULT '' NOT NULL,
115 pref_admin_pass character varying(20) DEFAULT '' NOT NULL
116 );
117
118 DROP SEQUENCE logs_id_seq;
119 CREATE SEQUENCE logs_id_seq
120 START 1
121 INCREMENT 1
122 MAXVALUE 2147483647
123 MINVALUE 1
124 CACHE 1;
125
126 DROP TABLE logs;
127 CREATE TABLE logs (
128 id_log integer DEFAULT nextval('logs_id_seq'::text) NOT NULL,
129 date_log timestamp NOT NULL,
130 ip_log character varying(30) DEFAULT '' NOT NULL,
131 adh_log character varying(41) DEFAULT '' NOT NULL,
132 text_log text
133 );
134
135