parlement 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/CHANGES +14 -4
  2. data/README +25 -5
  3. data/Rakefile +21 -21
  4. data/app/controllers/account_controller.rb +5 -1
  5. data/app/controllers/elt_controller.rb +7 -10
  6. data/app/controllers/person_controller.rb +9 -0
  7. data/app/controllers/subscriber_controller.rb +21 -0
  8. data/app/helpers/elt_helper.rb +25 -13
  9. data/app/helpers/mailman.rb +9 -92
  10. data/app/helpers/subscriber_helper.rb +2 -0
  11. data/app/models/attachment.rb +2 -0
  12. data/app/models/elt.rb +64 -2
  13. data/app/models/mail.rb +198 -0
  14. data/app/models/mail_notify.rb +63 -0
  15. data/app/models/person.rb +8 -1
  16. data/app/views/account/_login.rhtml +31 -28
  17. data/app/views/account/_show.rhtml +4 -4
  18. data/app/views/elt/_elt.rhtml +23 -28
  19. data/app/views/elt/_list.rhtml +6 -2
  20. data/app/views/elt/new.rhtml +1 -1
  21. data/app/views/elt/show.rhtml +32 -10
  22. data/app/views/layouts/top.rhtml +16 -10
  23. data/app/views/mail_notify/publish.text.html.rhtml +46 -0
  24. data/app/views/mail_notify/publish.text.plain.rhtml +2 -0
  25. data/app/views/person/_listElts.rhtml +33 -0
  26. data/app/views/person/show.rhtml +21 -19
  27. data/config/boot.rb +2 -0
  28. data/config/environment.rb +19 -13
  29. data/config/environments/development.rb +3 -1
  30. data/config/environments/production.rb +2 -0
  31. data/config/environments/test.rb +2 -0
  32. data/config/routes.rb +5 -2
  33. data/db/ROOT/mail.txt +2 -0
  34. data/db/ROOT/parlement/news/release0.2.txt +8 -0
  35. data/db/ROOT/parlement/news/release0.3.txt +11 -0
  36. data/db/ROOT/parlement/test.txt +6 -1
  37. data/db/ROOT/parlement.txt +23 -30
  38. data/db/ROOT/perso.txt +17 -18
  39. data/db/development_structure.sql +133 -217
  40. data/db/schema.rb +83 -0
  41. data/db/schema.sql +11 -15
  42. data/lib/data_import.rb +3 -1
  43. data/public/attachment/file/architecture.png +0 -0
  44. data/public/attachment/file/architecture.svg +8972 -0
  45. data/public/attachment/file/security.svg +8960 -0
  46. data/public/images/Sleep-Deprivation-5.JPG +0 -0
  47. data/public/images/eltBackground.png +0 -0
  48. data/public/images/eltBackground.svg +89 -0
  49. data/public/images/orange_by_darren_Hester_350o.jpg +0 -0
  50. data/public/images/rails.png +0 -0
  51. data/public/images/smile.png +0 -0
  52. data/public/images/smile.svg +257 -0
  53. data/public/images/world.png +0 -0
  54. data/public/images/world.svg +170 -0
  55. data/public/javascripts/controls.js +30 -1
  56. data/public/javascripts/dragdrop.js +210 -145
  57. data/public/javascripts/effects.js +261 -399
  58. data/public/javascripts/ie7.js +6 -0
  59. data/public/javascripts/prototype.js +131 -72
  60. data/public/oldindex.html +270 -71
  61. data/public/stylesheets/default.css +189 -215
  62. data/script/about +1 -1
  63. data/script/breakpointer +1 -1
  64. data/script/console +1 -1
  65. data/script/destroy +1 -1
  66. data/script/generate +1 -1
  67. data/script/performance/benchmarker +1 -1
  68. data/script/performance/profiler +1 -1
  69. data/script/plugin +1 -1
  70. data/script/process/reaper +1 -1
  71. data/script/process/spawner +1 -1
  72. data/script/process/spinner +1 -1
  73. data/script/runner +1 -1
  74. data/script/server +1 -1
  75. data/test/fixtures/elts.yml +2 -0
  76. data/test/fixtures/mail/mail_ruby +27 -0
  77. data/test/fixtures/mail/mail_rubyChild +28 -0
  78. data/test/fixtures/mail/mail_rubyWithAttachment +7932 -0
  79. data/test/fixtures/mail/mail_rubyWithSubject +27 -0
  80. data/test/fixtures/mails.yml +7 -1
  81. data/test/fixtures/people.yml +5 -0
  82. data/test/fixtures/subscribers.yml +11 -0
  83. data/test/functional/account_controller_test.rb +38 -37
  84. data/test/functional/subscriber_controller_test.rb +128 -0
  85. data/test/test_helper.rb +44 -0
  86. data/test/unit/attachment_test.rb +1 -1
  87. data/test/unit/elt_test.rb +3 -2
  88. data/test/unit/mail_notify_test.rb +37 -0
  89. data/test/unit/mail_test.rb +124 -1
  90. data/test/unit/notifier_test.rb +0 -14
  91. data/test/unit/person_test.rb +2 -1
  92. data/test/unit/subscriber_test.rb +35 -0
  93. data/test/unit/user_test.rb +3 -3
  94. data/vendor/plugins/file_column/CHANGELOG +64 -0
  95. data/vendor/plugins/file_column/README +54 -0
  96. data/vendor/plugins/file_column/Rakefile +36 -0
  97. data/vendor/plugins/file_column/TODO +6 -0
  98. data/vendor/plugins/file_column/init.rb +12 -0
  99. data/vendor/plugins/file_column/lib/file_column.rb +719 -0
  100. data/vendor/plugins/file_column/lib/file_column_helper.rb +145 -0
  101. data/vendor/plugins/file_column/lib/file_compat.rb +28 -0
  102. data/vendor/plugins/file_column/lib/magick_file_column.rb +188 -0
  103. data/vendor/plugins/file_column/lib/validations.rb +112 -0
  104. data/vendor/plugins/file_column/test/abstract_unit.rb +90 -0
  105. data/vendor/plugins/file_column/test/connection.rb +17 -0
  106. data/vendor/plugins/file_column/test/file_column_helper_test.rb +97 -0
  107. data/vendor/plugins/file_column/test/file_column_test.rb +630 -0
  108. data/vendor/plugins/file_column/test/fixtures/entry.rb +32 -0
  109. data/vendor/plugins/file_column/test/fixtures/invalid-image.jpg +1 -0
  110. data/vendor/plugins/file_column/test/fixtures/kerb.jpg +0 -0
  111. data/vendor/plugins/file_column/test/fixtures/mysql.sql +25 -0
  112. data/vendor/plugins/file_column/test/fixtures/schema.rb +10 -0
  113. data/vendor/plugins/file_column/test/fixtures/skanthak.png +0 -0
  114. data/vendor/plugins/file_column/test/magick_test.rb +251 -0
  115. data/vendor/plugins/file_column/test/magick_view_only_test.rb +21 -0
  116. data/vendor/plugins/guid/README.TXT +19 -0
  117. data/vendor/plugins/guid/init.rb +23 -0
  118. data/vendor/plugins/guid/lib/usesguid.rb +37 -0
  119. data/vendor/plugins/guid/lib/uuid22.rb +43 -0
  120. data/vendor/plugins/guid/lib/uuidtools.rb +565 -0
  121. metadata +83 -15
  122. data/db/ROOT/CV.txt +0 -166
  123. data/lib/file_column.rb +0 -263
  124. data/lib/file_column_helper.rb +0 -45
  125. /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 = 'UNICODE';
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
- -- TOC entry 5 (OID 51832)
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
- CREATE SEQUENCE people_id_seq
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
- CREATE TABLE people (
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
- -- TOC entry 11 (OID 51848)
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 usersold (
41
- id serial NOT NULL,
42
- person_id text NOT NULL,
43
- salted_password text,
44
- salt text,
45
- verified integer DEFAULT 0,
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
- -- TOC entry 12 (OID 51865)
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 users (
57
- id serial NOT NULL,
58
- login text NOT NULL,
59
- salted_password character varying(40) NOT NULL,
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
- -- TOC entry 6 (OID 51879)
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 SEQUENCE elts_id_seq
79
- INCREMENT BY 1
80
- NO MAXVALUE
81
- NO MINVALUE
82
- CACHE 1;
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
- -- TOC entry 13 (OID 51881)
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 DEFAULT nextval('public.elts_id_seq'::text) NOT NULL,
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
- -- TOC entry 7 (OID 51899)
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 DEFAULT nextval('public.mails_id_seq'::text) NOT NULL,
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
- -- TOC entry 8 (OID 51913)
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 SEQUENCE attachments_id_seq
134
- START WITH 1
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
- content_type text,
151
- file text
94
+ name text,
95
+ email text
152
96
  );
153
97
 
154
98
 
155
99
  --
156
- -- TOC entry 9 (OID 51928)
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
- email text,
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
- -- TOC entry 17 (OID 51944)
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 choices (
186
- elt_id text NOT NULL,
187
- person_id text NOT NULL
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
- -- TOC entry 18 (OID 51959)
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 delegations (
197
- elt_id text NOT NULL,
136
+ CREATE TABLE usersold (
137
+ id serial NOT NULL,
198
138
  person_id text NOT NULL,
199
- "temporary" boolean DEFAULT false NOT NULL,
200
- delegate_to text NOT NULL
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
- -- TOC entry 20 (OID 51841)
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 people
210
- ADD CONSTRAINT people_pkey PRIMARY KEY (id);
151
+ ALTER TABLE ONLY attachments
152
+ ADD CONSTRAINT attachments_pkey PRIMARY KEY (id);
211
153
 
212
154
 
213
155
  --
214
- -- TOC entry 19 (OID 51843)
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 people
219
- ADD CONSTRAINT people_name_key UNIQUE (name);
159
+ ALTER TABLE ONLY choices
160
+ ADD CONSTRAINT choices_pkey PRIMARY KEY (elt_id, person_id);
220
161
 
221
162
 
222
163
  --
223
- -- TOC entry 22 (OID 51855)
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 usersold
228
- ADD CONSTRAINT usersold_pkey PRIMARY KEY (id);
167
+ ALTER TABLE ONLY delegations
168
+ ADD CONSTRAINT delegations_pkey PRIMARY KEY (elt_id, person_id);
229
169
 
230
170
 
231
171
  --
232
- -- TOC entry 21 (OID 51857)
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 usersold
237
- ADD CONSTRAINT usersold_person_id_key UNIQUE (person_id);
175
+ ALTER TABLE ONLY elts
176
+ ADD CONSTRAINT elts_pkey PRIMARY KEY (id);
238
177
 
239
178
 
240
179
  --
241
- -- TOC entry 23 (OID 51873)
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 users
246
- ADD CONSTRAINT users_pkey PRIMARY KEY (id);
183
+ ALTER TABLE ONLY mails
184
+ ADD CONSTRAINT mails_pkey PRIMARY KEY (id);
247
185
 
248
186
 
249
187
  --
250
- -- TOC entry 24 (OID 51888)
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 elts
255
- ADD CONSTRAINT elts_pkey PRIMARY KEY (id);
191
+ ALTER TABLE ONLY people
192
+ ADD CONSTRAINT people_name_key UNIQUE (name);
256
193
 
257
194
 
258
195
  --
259
- -- TOC entry 25 (OID 51907)
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 mails
264
- ADD CONSTRAINT mails_pkey PRIMARY KEY (id);
199
+ ALTER TABLE ONLY people
200
+ ADD CONSTRAINT people_pkey PRIMARY KEY (id);
265
201
 
266
202
 
267
203
  --
268
- -- TOC entry 26 (OID 51922)
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 attachments
273
- ADD CONSTRAINT attachments_pkey PRIMARY KEY (id);
207
+ ALTER TABLE ONLY users
208
+ ADD CONSTRAINT users_pkey PRIMARY KEY (id);
274
209
 
275
210
 
276
211
  --
277
- -- TOC entry 27 (OID 51937)
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 subscribers
282
- ADD CONSTRAINT subscribers_pkey PRIMARY KEY (id);
215
+ ALTER TABLE ONLY usersold
216
+ ADD CONSTRAINT usersold_person_id_key UNIQUE (person_id);
283
217
 
284
218
 
285
219
  --
286
- -- TOC entry 28 (OID 51949)
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 choices
291
- ADD CONSTRAINT choices_pkey PRIMARY KEY (elt_id, person_id);
223
+ ALTER TABLE ONLY usersold
224
+ ADD CONSTRAINT usersold_pkey PRIMARY KEY (id);
292
225
 
293
226
 
294
227
  --
295
- -- TOC entry 29 (OID 51965)
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 delegations
300
- ADD CONSTRAINT delegations_pkey PRIMARY KEY (elt_id, person_id);
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
- -- TOC entry 30 (OID 51859)
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 usersold
309
- ADD CONSTRAINT "$1" FOREIGN KEY (person_id) REFERENCES people(id);
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
- -- TOC entry 31 (OID 51875)
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 users
318
- ADD CONSTRAINT "$1" FOREIGN KEY (login) REFERENCES people(name);
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
- -- TOC entry 32 (OID 51890)
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 elts
327
- ADD CONSTRAINT "$1" FOREIGN KEY (parent_id) REFERENCES elts(id);
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
- -- TOC entry 33 (OID 51894)
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 elts
336
- ADD CONSTRAINT "$2" FOREIGN KEY (person_id) REFERENCES people(id);
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
- -- TOC entry 34 (OID 51909)
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 mails
345
- ADD CONSTRAINT "$1" FOREIGN KEY (elt_id) REFERENCES elts(id);
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
- -- TOC entry 35 (OID 51924)
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 attachments
354
- ADD CONSTRAINT "$1" FOREIGN KEY (elt_id) REFERENCES elts(id);
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
- -- TOC entry 36 (OID 51939)
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 subscribers
363
- ADD CONSTRAINT "$1" FOREIGN KEY (elt_id) REFERENCES elts(id);
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
- -- TOC entry 37 (OID 51951)
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 choices
372
- ADD CONSTRAINT "$1" FOREIGN KEY (elt_id) REFERENCES elts(id);
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
- -- TOC entry 38 (OID 51955)
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 choices
381
- ADD CONSTRAINT "$2" FOREIGN KEY (person_id) REFERENCES people(id);
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
- -- TOC entry 39 (OID 51967)
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 delegations
390
- ADD CONSTRAINT "$1" FOREIGN KEY (elt_id) REFERENCES elts(id);
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
- -- TOC entry 40 (OID 51971)
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 delegations
399
- ADD CONSTRAINT "$2" FOREIGN KEY (person_id) REFERENCES people(id);
319
+ ALTER TABLE ONLY users
320
+ ADD CONSTRAINT users_login_fkey FOREIGN KEY ("login") REFERENCES people(name);
400
321
 
401
322
 
402
323
  --
403
- -- TOC entry 41 (OID 51975)
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 delegations
408
- ADD CONSTRAINT "$3" FOREIGN KEY (delegate_to) REFERENCES people(id);
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
- -- TOC entry 3 (OID 2200)
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