parlement 0.2 → 0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +14 -4
- data/README +25 -5
- data/Rakefile +21 -21
- data/app/controllers/account_controller.rb +5 -1
- data/app/controllers/elt_controller.rb +7 -10
- data/app/controllers/person_controller.rb +9 -0
- data/app/controllers/subscriber_controller.rb +21 -0
- data/app/helpers/elt_helper.rb +25 -13
- data/app/helpers/mailman.rb +9 -92
- data/app/helpers/subscriber_helper.rb +2 -0
- data/app/models/attachment.rb +2 -0
- data/app/models/elt.rb +64 -2
- data/app/models/mail.rb +198 -0
- data/app/models/mail_notify.rb +63 -0
- data/app/models/person.rb +8 -1
- data/app/views/account/_login.rhtml +31 -28
- data/app/views/account/_show.rhtml +4 -4
- data/app/views/elt/_elt.rhtml +23 -28
- data/app/views/elt/_list.rhtml +6 -2
- data/app/views/elt/new.rhtml +1 -1
- data/app/views/elt/show.rhtml +32 -10
- data/app/views/layouts/top.rhtml +16 -10
- data/app/views/mail_notify/publish.text.html.rhtml +46 -0
- data/app/views/mail_notify/publish.text.plain.rhtml +2 -0
- data/app/views/person/_listElts.rhtml +33 -0
- data/app/views/person/show.rhtml +21 -19
- data/config/boot.rb +2 -0
- data/config/environment.rb +19 -13
- data/config/environments/development.rb +3 -1
- data/config/environments/production.rb +2 -0
- data/config/environments/test.rb +2 -0
- data/config/routes.rb +5 -2
- data/db/ROOT/mail.txt +2 -0
- data/db/ROOT/parlement/news/release0.2.txt +8 -0
- data/db/ROOT/parlement/news/release0.3.txt +11 -0
- data/db/ROOT/parlement/test.txt +6 -1
- data/db/ROOT/parlement.txt +23 -30
- data/db/ROOT/perso.txt +17 -18
- data/db/development_structure.sql +133 -217
- data/db/schema.rb +83 -0
- data/db/schema.sql +11 -15
- data/lib/data_import.rb +3 -1
- data/public/attachment/file/architecture.png +0 -0
- data/public/attachment/file/architecture.svg +8972 -0
- data/public/attachment/file/security.svg +8960 -0
- data/public/images/Sleep-Deprivation-5.JPG +0 -0
- data/public/images/eltBackground.png +0 -0
- data/public/images/eltBackground.svg +89 -0
- data/public/images/orange_by_darren_Hester_350o.jpg +0 -0
- data/public/images/rails.png +0 -0
- data/public/images/smile.png +0 -0
- data/public/images/smile.svg +257 -0
- data/public/images/world.png +0 -0
- data/public/images/world.svg +170 -0
- data/public/javascripts/controls.js +30 -1
- data/public/javascripts/dragdrop.js +210 -145
- data/public/javascripts/effects.js +261 -399
- data/public/javascripts/ie7.js +6 -0
- data/public/javascripts/prototype.js +131 -72
- data/public/oldindex.html +270 -71
- data/public/stylesheets/default.css +189 -215
- data/script/about +1 -1
- data/script/breakpointer +1 -1
- data/script/console +1 -1
- data/script/destroy +1 -1
- data/script/generate +1 -1
- data/script/performance/benchmarker +1 -1
- data/script/performance/profiler +1 -1
- data/script/plugin +1 -1
- data/script/process/reaper +1 -1
- data/script/process/spawner +1 -1
- data/script/process/spinner +1 -1
- data/script/runner +1 -1
- data/script/server +1 -1
- data/test/fixtures/elts.yml +2 -0
- data/test/fixtures/mail/mail_ruby +27 -0
- data/test/fixtures/mail/mail_rubyChild +28 -0
- data/test/fixtures/mail/mail_rubyWithAttachment +7932 -0
- data/test/fixtures/mail/mail_rubyWithSubject +27 -0
- data/test/fixtures/mails.yml +7 -1
- data/test/fixtures/people.yml +5 -0
- data/test/fixtures/subscribers.yml +11 -0
- data/test/functional/account_controller_test.rb +38 -37
- data/test/functional/subscriber_controller_test.rb +128 -0
- data/test/test_helper.rb +44 -0
- data/test/unit/attachment_test.rb +1 -1
- data/test/unit/elt_test.rb +3 -2
- data/test/unit/mail_notify_test.rb +37 -0
- data/test/unit/mail_test.rb +124 -1
- data/test/unit/notifier_test.rb +0 -14
- data/test/unit/person_test.rb +2 -1
- data/test/unit/subscriber_test.rb +35 -0
- data/test/unit/user_test.rb +3 -3
- data/vendor/plugins/file_column/CHANGELOG +64 -0
- data/vendor/plugins/file_column/README +54 -0
- data/vendor/plugins/file_column/Rakefile +36 -0
- data/vendor/plugins/file_column/TODO +6 -0
- data/vendor/plugins/file_column/init.rb +12 -0
- data/vendor/plugins/file_column/lib/file_column.rb +719 -0
- data/vendor/plugins/file_column/lib/file_column_helper.rb +145 -0
- data/vendor/plugins/file_column/lib/file_compat.rb +28 -0
- data/vendor/plugins/file_column/lib/magick_file_column.rb +188 -0
- data/vendor/plugins/file_column/lib/validations.rb +112 -0
- data/vendor/plugins/file_column/test/abstract_unit.rb +90 -0
- data/vendor/plugins/file_column/test/connection.rb +17 -0
- data/vendor/plugins/file_column/test/file_column_helper_test.rb +97 -0
- data/vendor/plugins/file_column/test/file_column_test.rb +630 -0
- data/vendor/plugins/file_column/test/fixtures/entry.rb +32 -0
- data/vendor/plugins/file_column/test/fixtures/invalid-image.jpg +1 -0
- data/vendor/plugins/file_column/test/fixtures/kerb.jpg +0 -0
- data/vendor/plugins/file_column/test/fixtures/mysql.sql +25 -0
- data/vendor/plugins/file_column/test/fixtures/schema.rb +10 -0
- data/vendor/plugins/file_column/test/fixtures/skanthak.png +0 -0
- data/vendor/plugins/file_column/test/magick_test.rb +251 -0
- data/vendor/plugins/file_column/test/magick_view_only_test.rb +21 -0
- data/vendor/plugins/guid/README.TXT +19 -0
- data/vendor/plugins/guid/init.rb +23 -0
- data/vendor/plugins/guid/lib/usesguid.rb +37 -0
- data/vendor/plugins/guid/lib/uuid22.rb +43 -0
- data/vendor/plugins/guid/lib/uuidtools.rb +565 -0
- metadata +83 -15
- data/db/ROOT/CV.txt +0 -166
- data/lib/file_column.rb +0 -263
- data/lib/file_column_helper.rb +0 -45
- /data/{lib → vendor/plugins/file_column/lib}/rails_file_column.rb +0 -0
|
@@ -2,93 +2,66 @@
|
|
|
2
2
|
-- PostgreSQL database dump
|
|
3
3
|
--
|
|
4
4
|
|
|
5
|
-
SET client_encoding = '
|
|
5
|
+
SET client_encoding = 'UTF8';
|
|
6
6
|
SET check_function_bodies = false;
|
|
7
|
-
|
|
8
|
-
SET search_path = public, pg_catalog;
|
|
7
|
+
SET client_min_messages = warning;
|
|
9
8
|
|
|
10
9
|
--
|
|
11
|
-
--
|
|
12
|
-
-- Name: people_id_seq; Type: SEQUENCE; Schema: public; Owner: manu
|
|
10
|
+
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
|
|
13
11
|
--
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
INCREMENT BY 1
|
|
17
|
-
NO MAXVALUE
|
|
18
|
-
NO MINVALUE
|
|
19
|
-
CACHE 1;
|
|
13
|
+
COMMENT ON SCHEMA public IS 'Standard public schema';
|
|
20
14
|
|
|
21
15
|
|
|
22
|
-
|
|
23
|
-
-- TOC entry 10 (OID 51834)
|
|
24
|
-
-- Name: people; Type: TABLE; Schema: public; Owner: manu
|
|
25
|
-
--
|
|
16
|
+
SET search_path = public, pg_catalog;
|
|
26
17
|
|
|
27
|
-
|
|
28
|
-
id text DEFAULT nextval('public.people_id_seq'::text) NOT NULL,
|
|
29
|
-
created_on timestamp with time zone DEFAULT now() NOT NULL,
|
|
30
|
-
name text,
|
|
31
|
-
email text
|
|
32
|
-
);
|
|
18
|
+
SET default_tablespace = '';
|
|
33
19
|
|
|
20
|
+
SET default_with_oids = false;
|
|
34
21
|
|
|
35
22
|
--
|
|
36
|
-
--
|
|
37
|
-
-- Name: usersold; Type: TABLE; Schema: public; Owner: manu
|
|
23
|
+
-- Name: attachments; Type: TABLE; Schema: public; Owner: manu; Tablespace:
|
|
38
24
|
--
|
|
39
25
|
|
|
40
|
-
CREATE TABLE
|
|
41
|
-
id
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
new_email text,
|
|
47
|
-
security_token text
|
|
26
|
+
CREATE TABLE attachments (
|
|
27
|
+
id text NOT NULL,
|
|
28
|
+
elt_id text NOT NULL,
|
|
29
|
+
created_on timestamp with time zone DEFAULT now() NOT NULL,
|
|
30
|
+
content_type text,
|
|
31
|
+
file text
|
|
48
32
|
);
|
|
49
33
|
|
|
50
34
|
|
|
51
35
|
--
|
|
52
|
-
--
|
|
53
|
-
-- Name: users; Type: TABLE; Schema: public; Owner: manu
|
|
36
|
+
-- Name: choices; Type: TABLE; Schema: public; Owner: manu; Tablespace:
|
|
54
37
|
--
|
|
55
38
|
|
|
56
|
-
CREATE TABLE
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
email character varying(60),
|
|
61
|
-
firstname character varying(40),
|
|
62
|
-
lastname character varying(40),
|
|
63
|
-
salt character(40) NOT NULL,
|
|
64
|
-
verified integer DEFAULT 0,
|
|
65
|
-
role character varying(40),
|
|
66
|
-
security_token character(40),
|
|
67
|
-
token_expiry timestamp without time zone,
|
|
68
|
-
deleted integer DEFAULT 0,
|
|
69
|
-
delete_after timestamp without time zone
|
|
39
|
+
CREATE TABLE choices (
|
|
40
|
+
elt_id text NOT NULL,
|
|
41
|
+
person_id text NOT NULL,
|
|
42
|
+
created_on timestamp with time zone DEFAULT now() NOT NULL
|
|
70
43
|
);
|
|
71
44
|
|
|
72
45
|
|
|
73
46
|
--
|
|
74
|
-
--
|
|
75
|
-
-- Name: elts_id_seq; Type: SEQUENCE; Schema: public; Owner: manu
|
|
47
|
+
-- Name: delegations; Type: TABLE; Schema: public; Owner: manu; Tablespace:
|
|
76
48
|
--
|
|
77
49
|
|
|
78
|
-
CREATE
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
50
|
+
CREATE TABLE delegations (
|
|
51
|
+
elt_id text NOT NULL,
|
|
52
|
+
person_id text NOT NULL,
|
|
53
|
+
created_on timestamp with time zone DEFAULT now() NOT NULL,
|
|
54
|
+
"temporary" boolean DEFAULT false NOT NULL,
|
|
55
|
+
delegate_to text NOT NULL
|
|
56
|
+
);
|
|
83
57
|
|
|
84
58
|
|
|
85
59
|
--
|
|
86
|
-
--
|
|
87
|
-
-- Name: elts; Type: TABLE; Schema: public; Owner: manu
|
|
60
|
+
-- Name: elts; Type: TABLE; Schema: public; Owner: manu; Tablespace:
|
|
88
61
|
--
|
|
89
62
|
|
|
90
63
|
CREATE TABLE elts (
|
|
91
|
-
id text
|
|
64
|
+
id text NOT NULL,
|
|
92
65
|
parent_id text,
|
|
93
66
|
"position" double precision,
|
|
94
67
|
created_on timestamp with time zone DEFAULT now() NOT NULL,
|
|
@@ -99,25 +72,11 @@ CREATE TABLE elts (
|
|
|
99
72
|
|
|
100
73
|
|
|
101
74
|
--
|
|
102
|
-
--
|
|
103
|
-
-- Name: mails_id_seq; Type: SEQUENCE; Schema: public; Owner: manu
|
|
104
|
-
--
|
|
105
|
-
|
|
106
|
-
CREATE SEQUENCE mails_id_seq
|
|
107
|
-
START WITH 1
|
|
108
|
-
INCREMENT BY 1
|
|
109
|
-
NO MAXVALUE
|
|
110
|
-
NO MINVALUE
|
|
111
|
-
CACHE 1;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
--
|
|
115
|
-
-- TOC entry 14 (OID 51901)
|
|
116
|
-
-- Name: mails; Type: TABLE; Schema: public; Owner: manu
|
|
75
|
+
-- Name: mails; Type: TABLE; Schema: public; Owner: manu; Tablespace:
|
|
117
76
|
--
|
|
118
77
|
|
|
119
78
|
CREATE TABLE mails (
|
|
120
|
-
id text
|
|
79
|
+
id text NOT NULL,
|
|
121
80
|
elt_id text NOT NULL,
|
|
122
81
|
message text,
|
|
123
82
|
mail_parents text,
|
|
@@ -126,293 +85,250 @@ CREATE TABLE mails (
|
|
|
126
85
|
|
|
127
86
|
|
|
128
87
|
--
|
|
129
|
-
--
|
|
130
|
-
-- Name: attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: manu
|
|
88
|
+
-- Name: people; Type: TABLE; Schema: public; Owner: manu; Tablespace:
|
|
131
89
|
--
|
|
132
90
|
|
|
133
|
-
CREATE
|
|
134
|
-
|
|
135
|
-
INCREMENT BY 1
|
|
136
|
-
NO MAXVALUE
|
|
137
|
-
NO MINVALUE
|
|
138
|
-
CACHE 1;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
--
|
|
142
|
-
-- TOC entry 15 (OID 51915)
|
|
143
|
-
-- Name: attachments; Type: TABLE; Schema: public; Owner: manu
|
|
144
|
-
--
|
|
145
|
-
|
|
146
|
-
CREATE TABLE attachments (
|
|
147
|
-
id text DEFAULT nextval('attachments_id_seq'::text) NOT NULL,
|
|
148
|
-
elt_id text NOT NULL,
|
|
91
|
+
CREATE TABLE people (
|
|
92
|
+
id text NOT NULL,
|
|
149
93
|
created_on timestamp with time zone DEFAULT now() NOT NULL,
|
|
150
|
-
|
|
151
|
-
|
|
94
|
+
name text,
|
|
95
|
+
email text
|
|
152
96
|
);
|
|
153
97
|
|
|
154
98
|
|
|
155
99
|
--
|
|
156
|
-
--
|
|
157
|
-
-- Name: subscribers_id_seq; Type: SEQUENCE; Schema: public; Owner: manu
|
|
158
|
-
--
|
|
159
|
-
|
|
160
|
-
CREATE SEQUENCE subscribers_id_seq
|
|
161
|
-
INCREMENT BY 1
|
|
162
|
-
NO MAXVALUE
|
|
163
|
-
NO MINVALUE
|
|
164
|
-
CACHE 1;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
--
|
|
168
|
-
-- TOC entry 16 (OID 51930)
|
|
169
|
-
-- Name: subscribers; Type: TABLE; Schema: public; Owner: manu
|
|
100
|
+
-- Name: subscribers; Type: TABLE; Schema: public; Owner: manu; Tablespace:
|
|
170
101
|
--
|
|
171
102
|
|
|
172
103
|
CREATE TABLE subscribers (
|
|
173
|
-
id text DEFAULT nextval('public.subscribers_id_seq'::text) NOT NULL,
|
|
174
104
|
elt_id text NOT NULL,
|
|
175
|
-
|
|
176
|
-
confirmed boolean DEFAULT false NOT NULL
|
|
105
|
+
person_id text NOT NULL
|
|
177
106
|
);
|
|
178
107
|
|
|
179
108
|
|
|
109
|
+
SET default_with_oids = true;
|
|
110
|
+
|
|
180
111
|
--
|
|
181
|
-
--
|
|
182
|
-
-- Name: choices; Type: TABLE; Schema: public; Owner: manu
|
|
112
|
+
-- Name: users; Type: TABLE; Schema: public; Owner: manu; Tablespace:
|
|
183
113
|
--
|
|
184
114
|
|
|
185
|
-
CREATE TABLE
|
|
186
|
-
|
|
187
|
-
|
|
115
|
+
CREATE TABLE users (
|
|
116
|
+
id serial NOT NULL,
|
|
117
|
+
"login" text NOT NULL,
|
|
118
|
+
salted_password character varying(40) NOT NULL,
|
|
119
|
+
email character varying(60),
|
|
120
|
+
firstname character varying(40),
|
|
121
|
+
lastname character varying(40),
|
|
122
|
+
salt character(40) NOT NULL,
|
|
123
|
+
verified integer DEFAULT 0,
|
|
124
|
+
"role" character varying(40),
|
|
125
|
+
security_token character(40),
|
|
126
|
+
token_expiry timestamp without time zone,
|
|
127
|
+
deleted integer DEFAULT 0,
|
|
128
|
+
delete_after timestamp without time zone
|
|
188
129
|
);
|
|
189
130
|
|
|
190
131
|
|
|
191
132
|
--
|
|
192
|
-
--
|
|
193
|
-
-- Name: delegations; Type: TABLE; Schema: public; Owner: manu
|
|
133
|
+
-- Name: usersold; Type: TABLE; Schema: public; Owner: manu; Tablespace:
|
|
194
134
|
--
|
|
195
135
|
|
|
196
|
-
CREATE TABLE
|
|
197
|
-
|
|
136
|
+
CREATE TABLE usersold (
|
|
137
|
+
id serial NOT NULL,
|
|
198
138
|
person_id text NOT NULL,
|
|
199
|
-
|
|
200
|
-
|
|
139
|
+
salted_password text,
|
|
140
|
+
salt text,
|
|
141
|
+
verified integer DEFAULT 0,
|
|
142
|
+
new_email text,
|
|
143
|
+
security_token text
|
|
201
144
|
);
|
|
202
145
|
|
|
203
146
|
|
|
204
147
|
--
|
|
205
|
-
--
|
|
206
|
-
-- Name: people_pkey; Type: CONSTRAINT; Schema: public; Owner: manu
|
|
148
|
+
-- Name: attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
|
|
207
149
|
--
|
|
208
150
|
|
|
209
|
-
ALTER TABLE ONLY
|
|
210
|
-
ADD CONSTRAINT
|
|
151
|
+
ALTER TABLE ONLY attachments
|
|
152
|
+
ADD CONSTRAINT attachments_pkey PRIMARY KEY (id);
|
|
211
153
|
|
|
212
154
|
|
|
213
155
|
--
|
|
214
|
-
--
|
|
215
|
-
-- Name: people_name_key; Type: CONSTRAINT; Schema: public; Owner: manu
|
|
156
|
+
-- Name: choices_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
|
|
216
157
|
--
|
|
217
158
|
|
|
218
|
-
ALTER TABLE ONLY
|
|
219
|
-
ADD CONSTRAINT
|
|
159
|
+
ALTER TABLE ONLY choices
|
|
160
|
+
ADD CONSTRAINT choices_pkey PRIMARY KEY (elt_id, person_id);
|
|
220
161
|
|
|
221
162
|
|
|
222
163
|
--
|
|
223
|
-
--
|
|
224
|
-
-- Name: usersold_pkey; Type: CONSTRAINT; Schema: public; Owner: manu
|
|
164
|
+
-- Name: delegations_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
|
|
225
165
|
--
|
|
226
166
|
|
|
227
|
-
ALTER TABLE ONLY
|
|
228
|
-
ADD CONSTRAINT
|
|
167
|
+
ALTER TABLE ONLY delegations
|
|
168
|
+
ADD CONSTRAINT delegations_pkey PRIMARY KEY (elt_id, person_id);
|
|
229
169
|
|
|
230
170
|
|
|
231
171
|
--
|
|
232
|
-
--
|
|
233
|
-
-- Name: usersold_person_id_key; Type: CONSTRAINT; Schema: public; Owner: manu
|
|
172
|
+
-- Name: elts_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
|
|
234
173
|
--
|
|
235
174
|
|
|
236
|
-
ALTER TABLE ONLY
|
|
237
|
-
ADD CONSTRAINT
|
|
175
|
+
ALTER TABLE ONLY elts
|
|
176
|
+
ADD CONSTRAINT elts_pkey PRIMARY KEY (id);
|
|
238
177
|
|
|
239
178
|
|
|
240
179
|
--
|
|
241
|
-
--
|
|
242
|
-
-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: manu
|
|
180
|
+
-- Name: mails_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
|
|
243
181
|
--
|
|
244
182
|
|
|
245
|
-
ALTER TABLE ONLY
|
|
246
|
-
ADD CONSTRAINT
|
|
183
|
+
ALTER TABLE ONLY mails
|
|
184
|
+
ADD CONSTRAINT mails_pkey PRIMARY KEY (id);
|
|
247
185
|
|
|
248
186
|
|
|
249
187
|
--
|
|
250
|
-
--
|
|
251
|
-
-- Name: elts_pkey; Type: CONSTRAINT; Schema: public; Owner: manu
|
|
188
|
+
-- Name: people_name_key; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
|
|
252
189
|
--
|
|
253
190
|
|
|
254
|
-
ALTER TABLE ONLY
|
|
255
|
-
ADD CONSTRAINT
|
|
191
|
+
ALTER TABLE ONLY people
|
|
192
|
+
ADD CONSTRAINT people_name_key UNIQUE (name);
|
|
256
193
|
|
|
257
194
|
|
|
258
195
|
--
|
|
259
|
-
--
|
|
260
|
-
-- Name: mails_pkey; Type: CONSTRAINT; Schema: public; Owner: manu
|
|
196
|
+
-- Name: people_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
|
|
261
197
|
--
|
|
262
198
|
|
|
263
|
-
ALTER TABLE ONLY
|
|
264
|
-
ADD CONSTRAINT
|
|
199
|
+
ALTER TABLE ONLY people
|
|
200
|
+
ADD CONSTRAINT people_pkey PRIMARY KEY (id);
|
|
265
201
|
|
|
266
202
|
|
|
267
203
|
--
|
|
268
|
-
--
|
|
269
|
-
-- Name: attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: manu
|
|
204
|
+
-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
|
|
270
205
|
--
|
|
271
206
|
|
|
272
|
-
ALTER TABLE ONLY
|
|
273
|
-
ADD CONSTRAINT
|
|
207
|
+
ALTER TABLE ONLY users
|
|
208
|
+
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
|
|
274
209
|
|
|
275
210
|
|
|
276
211
|
--
|
|
277
|
-
--
|
|
278
|
-
-- Name: subscribers_pkey; Type: CONSTRAINT; Schema: public; Owner: manu
|
|
212
|
+
-- Name: usersold_person_id_key; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
|
|
279
213
|
--
|
|
280
214
|
|
|
281
|
-
ALTER TABLE ONLY
|
|
282
|
-
ADD CONSTRAINT
|
|
215
|
+
ALTER TABLE ONLY usersold
|
|
216
|
+
ADD CONSTRAINT usersold_person_id_key UNIQUE (person_id);
|
|
283
217
|
|
|
284
218
|
|
|
285
219
|
--
|
|
286
|
-
--
|
|
287
|
-
-- Name: choices_pkey; Type: CONSTRAINT; Schema: public; Owner: manu
|
|
220
|
+
-- Name: usersold_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
|
|
288
221
|
--
|
|
289
222
|
|
|
290
|
-
ALTER TABLE ONLY
|
|
291
|
-
ADD CONSTRAINT
|
|
223
|
+
ALTER TABLE ONLY usersold
|
|
224
|
+
ADD CONSTRAINT usersold_pkey PRIMARY KEY (id);
|
|
292
225
|
|
|
293
226
|
|
|
294
227
|
--
|
|
295
|
-
--
|
|
296
|
-
-- Name: delegations_pkey; Type: CONSTRAINT; Schema: public; Owner: manu
|
|
228
|
+
-- Name: attachments_elt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
297
229
|
--
|
|
298
230
|
|
|
299
|
-
ALTER TABLE ONLY
|
|
300
|
-
ADD CONSTRAINT
|
|
231
|
+
ALTER TABLE ONLY attachments
|
|
232
|
+
ADD CONSTRAINT attachments_elt_id_fkey FOREIGN KEY (elt_id) REFERENCES elts(id);
|
|
301
233
|
|
|
302
234
|
|
|
303
235
|
--
|
|
304
|
-
--
|
|
305
|
-
-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
236
|
+
-- Name: choices_elt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
306
237
|
--
|
|
307
238
|
|
|
308
|
-
ALTER TABLE ONLY
|
|
309
|
-
ADD CONSTRAINT
|
|
239
|
+
ALTER TABLE ONLY choices
|
|
240
|
+
ADD CONSTRAINT choices_elt_id_fkey FOREIGN KEY (elt_id) REFERENCES elts(id);
|
|
310
241
|
|
|
311
242
|
|
|
312
243
|
--
|
|
313
|
-
--
|
|
314
|
-
-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
244
|
+
-- Name: choices_person_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
315
245
|
--
|
|
316
246
|
|
|
317
|
-
ALTER TABLE ONLY
|
|
318
|
-
ADD CONSTRAINT
|
|
247
|
+
ALTER TABLE ONLY choices
|
|
248
|
+
ADD CONSTRAINT choices_person_id_fkey FOREIGN KEY (person_id) REFERENCES people(id);
|
|
319
249
|
|
|
320
250
|
|
|
321
251
|
--
|
|
322
|
-
--
|
|
323
|
-
-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
252
|
+
-- Name: delegations_delegate_to_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
324
253
|
--
|
|
325
254
|
|
|
326
|
-
ALTER TABLE ONLY
|
|
327
|
-
ADD CONSTRAINT
|
|
255
|
+
ALTER TABLE ONLY delegations
|
|
256
|
+
ADD CONSTRAINT delegations_delegate_to_fkey FOREIGN KEY (delegate_to) REFERENCES people(id);
|
|
328
257
|
|
|
329
258
|
|
|
330
259
|
--
|
|
331
|
-
--
|
|
332
|
-
-- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
260
|
+
-- Name: delegations_elt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
333
261
|
--
|
|
334
262
|
|
|
335
|
-
ALTER TABLE ONLY
|
|
336
|
-
ADD CONSTRAINT
|
|
263
|
+
ALTER TABLE ONLY delegations
|
|
264
|
+
ADD CONSTRAINT delegations_elt_id_fkey FOREIGN KEY (elt_id) REFERENCES elts(id);
|
|
337
265
|
|
|
338
266
|
|
|
339
267
|
--
|
|
340
|
-
--
|
|
341
|
-
-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
268
|
+
-- Name: delegations_person_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
342
269
|
--
|
|
343
270
|
|
|
344
|
-
ALTER TABLE ONLY
|
|
345
|
-
ADD CONSTRAINT
|
|
271
|
+
ALTER TABLE ONLY delegations
|
|
272
|
+
ADD CONSTRAINT delegations_person_id_fkey FOREIGN KEY (person_id) REFERENCES people(id);
|
|
346
273
|
|
|
347
274
|
|
|
348
275
|
--
|
|
349
|
-
--
|
|
350
|
-
-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
276
|
+
-- Name: elts_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
351
277
|
--
|
|
352
278
|
|
|
353
|
-
ALTER TABLE ONLY
|
|
354
|
-
ADD CONSTRAINT
|
|
279
|
+
ALTER TABLE ONLY elts
|
|
280
|
+
ADD CONSTRAINT elts_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES elts(id);
|
|
355
281
|
|
|
356
282
|
|
|
357
283
|
--
|
|
358
|
-
--
|
|
359
|
-
-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
284
|
+
-- Name: elts_person_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
360
285
|
--
|
|
361
286
|
|
|
362
|
-
ALTER TABLE ONLY
|
|
363
|
-
ADD CONSTRAINT
|
|
287
|
+
ALTER TABLE ONLY elts
|
|
288
|
+
ADD CONSTRAINT elts_person_id_fkey FOREIGN KEY (person_id) REFERENCES people(id);
|
|
364
289
|
|
|
365
290
|
|
|
366
291
|
--
|
|
367
|
-
--
|
|
368
|
-
-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
292
|
+
-- Name: mails_elt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
369
293
|
--
|
|
370
294
|
|
|
371
|
-
ALTER TABLE ONLY
|
|
372
|
-
ADD CONSTRAINT
|
|
295
|
+
ALTER TABLE ONLY mails
|
|
296
|
+
ADD CONSTRAINT mails_elt_id_fkey FOREIGN KEY (elt_id) REFERENCES elts(id);
|
|
373
297
|
|
|
374
298
|
|
|
375
299
|
--
|
|
376
|
-
--
|
|
377
|
-
-- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
300
|
+
-- Name: subscribers_elt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
378
301
|
--
|
|
379
302
|
|
|
380
|
-
ALTER TABLE ONLY
|
|
381
|
-
ADD CONSTRAINT
|
|
303
|
+
ALTER TABLE ONLY subscribers
|
|
304
|
+
ADD CONSTRAINT subscribers_elt_id_fkey FOREIGN KEY (elt_id) REFERENCES elts(id);
|
|
382
305
|
|
|
383
306
|
|
|
384
307
|
--
|
|
385
|
-
--
|
|
386
|
-
-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
308
|
+
-- Name: subscribers_person_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
387
309
|
--
|
|
388
310
|
|
|
389
|
-
ALTER TABLE ONLY
|
|
390
|
-
ADD CONSTRAINT
|
|
311
|
+
ALTER TABLE ONLY subscribers
|
|
312
|
+
ADD CONSTRAINT subscribers_person_id_fkey FOREIGN KEY (person_id) REFERENCES people(id);
|
|
391
313
|
|
|
392
314
|
|
|
393
315
|
--
|
|
394
|
-
--
|
|
395
|
-
-- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
316
|
+
-- Name: users_login_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
396
317
|
--
|
|
397
318
|
|
|
398
|
-
ALTER TABLE ONLY
|
|
399
|
-
ADD CONSTRAINT
|
|
319
|
+
ALTER TABLE ONLY users
|
|
320
|
+
ADD CONSTRAINT users_login_fkey FOREIGN KEY ("login") REFERENCES people(name);
|
|
400
321
|
|
|
401
322
|
|
|
402
323
|
--
|
|
403
|
-
--
|
|
404
|
-
-- Name: $3; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
324
|
+
-- Name: usersold_person_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: manu
|
|
405
325
|
--
|
|
406
326
|
|
|
407
|
-
ALTER TABLE ONLY
|
|
408
|
-
ADD CONSTRAINT
|
|
327
|
+
ALTER TABLE ONLY usersold
|
|
328
|
+
ADD CONSTRAINT usersold_person_id_fkey FOREIGN KEY (person_id) REFERENCES people(id);
|
|
409
329
|
|
|
410
330
|
|
|
411
331
|
--
|
|
412
|
-
--
|
|
413
|
-
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
|
|
332
|
+
-- PostgreSQL database dump complete
|
|
414
333
|
--
|
|
415
334
|
|
|
416
|
-
COMMENT ON SCHEMA public IS 'Standard public schema';
|
|
417
|
-
|
|
418
|
-
|
data/db/schema.rb
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# This file is autogenerated. Instead of editing this file, please use the
|
|
2
|
+
# migrations feature of ActiveRecord to incrementally modify your database, and
|
|
3
|
+
# then regenerate this schema definition.
|
|
4
|
+
|
|
5
|
+
ActiveRecord::Schema.define() do
|
|
6
|
+
|
|
7
|
+
create_table "attachments", :force => true do |t|
|
|
8
|
+
t.column "elt_id", :text, :null => false
|
|
9
|
+
t.column "created_on", :datetime, :default => Tue Feb 07 10:25:26 CET 2006, :null => false
|
|
10
|
+
t.column "content_type", :text
|
|
11
|
+
t.column "file", :text
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
create_table "choices", :id => false, :force => true do |t|
|
|
15
|
+
t.column "elt_id", :text, :null => false
|
|
16
|
+
t.column "person_id", :text, :null => false
|
|
17
|
+
t.column "created_on", :datetime, :default => Tue Feb 07 10:25:26 CET 2006, :null => false
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
create_table "delegations", :id => false, :force => true do |t|
|
|
21
|
+
t.column "elt_id", :text, :null => false
|
|
22
|
+
t.column "person_id", :text, :null => false
|
|
23
|
+
t.column "created_on", :datetime, :default => Tue Feb 07 10:25:26 CET 2006, :null => false
|
|
24
|
+
t.column "temporary", :boolean, :default => false, :null => false
|
|
25
|
+
t.column "delegate_to", :text, :null => false
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
create_table "elts", :force => true do |t|
|
|
29
|
+
t.column "parent_id", :text
|
|
30
|
+
t.column "position", :float
|
|
31
|
+
t.column "created_on", :datetime, :default => Tue Feb 07 10:25:26 CET 2006, :null => false
|
|
32
|
+
t.column "person_id", :text
|
|
33
|
+
t.column "subject", :text
|
|
34
|
+
t.column "body", :text
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
create_table "mails", :force => true do |t|
|
|
38
|
+
t.column "elt_id", :text, :null => false
|
|
39
|
+
t.column "message", :text
|
|
40
|
+
t.column "mail_parents", :text
|
|
41
|
+
t.column "file", :text
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
create_table "people", :force => true do |t|
|
|
45
|
+
t.column "created_on", :datetime, :default => Tue Feb 07 10:25:26 CET 2006, :null => false
|
|
46
|
+
t.column "name", :text
|
|
47
|
+
t.column "email", :text
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
add_index "people", ["name"], :name => "people_name_key", :unique => true
|
|
51
|
+
|
|
52
|
+
create_table "subscribers", :id => false, :force => true do |t|
|
|
53
|
+
t.column "elt_id", :text, :null => false
|
|
54
|
+
t.column "person_id", :text, :null => false
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
create_table "users", :force => true do |t|
|
|
58
|
+
t.column "login", :text, :null => false
|
|
59
|
+
t.column "salted_password", :string, :limit => 40, :null => false
|
|
60
|
+
t.column "email", :string, :limit => 60
|
|
61
|
+
t.column "firstname", :string, :limit => 40
|
|
62
|
+
t.column "lastname", :string, :limit => 40
|
|
63
|
+
t.column "salt", :string, :limit => 40, :null => false
|
|
64
|
+
t.column "verified", :integer, :default => 0
|
|
65
|
+
t.column "role", :string, :limit => 40
|
|
66
|
+
t.column "security_token", :string, :limit => 40
|
|
67
|
+
t.column "token_expiry", :datetime
|
|
68
|
+
t.column "deleted", :integer, :default => 0
|
|
69
|
+
t.column "delete_after", :datetime
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
create_table "usersold", :force => true do |t|
|
|
73
|
+
t.column "person_id", :text, :null => false
|
|
74
|
+
t.column "salted_password", :text
|
|
75
|
+
t.column "salt", :text
|
|
76
|
+
t.column "verified", :integer, :default => 0
|
|
77
|
+
t.column "new_email", :text
|
|
78
|
+
t.column "security_token", :text
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
add_index "usersold", ["person_id"], :name => "usersold_person_id_key", :unique => true
|
|
82
|
+
|
|
83
|
+
end
|