Changeset 1168 for trunk/wifidog-auth/sql/wifidog-postgres-schema.sql
- Timestamp:
- 01/15/07 23:13:34 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/sql/wifidog-postgres-schema.sql
r1158 r1168 3 3 -- 4 4 5 SET client_encoding = 'U NICODE';5 SET client_encoding = 'UTF8'; 6 6 SET check_function_bodies = false; 7 7 SET client_min_messages = warning; … … 11 11 -- 12 12 13 CREATE DATABASE wifidog WITH TEMPLATE = template0 ENCODING = 'U NICODE';13 CREATE DATABASE wifidog WITH TEMPLATE = template0 ENCODING = 'UTF8'; 14 14 15 15 16 16 \connect wifidog 17 17 18 SET client_encoding = 'U NICODE';18 SET client_encoding = 'UTF8'; 19 19 SET check_function_bodies = false; 20 20 SET client_min_messages = warning; … … 77 77 long_description text, 78 78 title_is_displayed boolean DEFAULT true NOT NULL, 79 last_update_timestamp timestamp without time zone DEFAULT now() NOT NULL, 79 80 CONSTRAINT content_type_not_empty_string CHECK ((content_type <> ''::text)) 80 81 ); … … 99 100 100 101 102 SET default_with_oids = false; 103 101 104 -- 102 105 -- Name: content_clickthrough_log; Type: TABLE; Schema: public; Owner: wifidog; Tablespace: … … 104 107 105 108 CREATE TABLE content_clickthrough_log ( 106 user_id text ,109 user_id text NOT NULL, 107 110 content_id text NOT NULL, 108 111 first_clickthrough_timestamp timestamp without time zone DEFAULT now() NOT NULL, … … 115 118 116 119 120 SET default_with_oids = true; 121 117 122 -- 118 123 -- Name: content_display_log; Type: TABLE; Schema: public; Owner: wifidog; Tablespace: … … 153 158 url text, 154 159 data_blob oid, 155 local_binary_size bigint, 156 creation_date timestamp without time zone DEFAULT now(), 157 last_update_date timestamp without time zone DEFAULT now() 160 local_binary_size bigint 158 161 ); 159 162 … … 206 209 CREATE TABLE content_group ( 207 210 content_group_id text NOT NULL, 208 is_artistic_content boolean DEFAULT false NOT NULL,209 is_locative_content boolean DEFAULT false NOT NULL,210 211 content_changes_on_mode text DEFAULT 'ALWAYS'::text NOT NULL, 211 212 content_ordering_mode text DEFAULT 'RANDOM'::text NOT NULL, … … 266 267 267 268 269 SET default_with_oids = false; 270 271 -- 272 -- Name: content_key_value_pairs; Type: TABLE; Schema: public; Owner: wifidog; Tablespace: 273 -- 274 275 CREATE TABLE content_key_value_pairs ( 276 content_id text NOT NULL, 277 "key" text NOT NULL, 278 value text 279 ); 280 281 282 SET default_with_oids = true; 283 268 284 -- 269 285 -- Name: content_langstring_entries; Type: TABLE; Schema: public; Owner: wifidog; Tablespace: … … 286 302 number_of_display_items integer DEFAULT 10 NOT NULL, 287 303 algorithm_strength real DEFAULT 0.75 NOT NULL, 288 max_item_age interval 304 max_item_age interval, 305 feed_expansion text DEFAULT 'FIRST'::text NOT NULL, 306 feed_ordering text DEFAULT 'REVERSE_DATE'::text NOT NULL, 307 display_empty_feeds boolean DEFAULT true NOT NULL 289 308 ); 290 309 … … 302 321 ); 303 322 323 324 SET default_with_oids = false; 325 326 -- 327 -- Name: content_shoutbox_messages; Type: TABLE; Schema: public; Owner: wifidog; Tablespace: 328 -- 329 330 CREATE TABLE content_shoutbox_messages ( 331 message_content_id text NOT NULL, 332 shoutbox_id text NOT NULL, 333 origin_node_id text NOT NULL, 334 author_user_id text NOT NULL, 335 creation_date timestamp without time zone DEFAULT now() 336 ); 337 338 339 SET default_with_oids = true; 304 340 305 341 -- … … 440 476 last_paged timestamp without time zone, 441 477 is_splash_only_node boolean DEFAULT false, 442 custom_portal_redirect_url text 478 custom_portal_redirect_url text, 479 gw_id text NOT NULL 443 480 ); 444 481 … … 556 593 557 594 -- 595 -- Name: content_clickthrough_log_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace: 596 -- 597 598 ALTER TABLE ONLY content_clickthrough_log 599 ADD CONSTRAINT content_clickthrough_log_pkey PRIMARY KEY (content_id, user_id, node_id, destination_url); 600 601 602 -- 558 603 -- Name: content_display_location_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace: 559 604 -- … … 564 609 565 610 -- 611 -- Name: content_display_log_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace: 612 -- 613 614 ALTER TABLE ONLY content_display_log 615 ADD CONSTRAINT content_display_log_pkey PRIMARY KEY (content_id, user_id, node_id); 616 617 618 -- 566 619 -- Name: content_group_element_has_allowed_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace: 567 620 -- … … 580 633 581 634 -- 582 -- Name: content_group_element_portal_display_log_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace:583 --584 585 ALTER TABLE ONLY content_display_log586 ADD CONSTRAINT content_group_element_portal_display_log_pkey PRIMARY KEY (user_id, content_id, node_id);587 588 589 --590 635 -- Name: content_group_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace: 591 636 -- … … 604 649 605 650 -- 651 -- Name: content_key_value_pairs_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace: 652 -- 653 654 ALTER TABLE ONLY content_key_value_pairs 655 ADD CONSTRAINT content_key_value_pairs_pkey PRIMARY KEY (content_id, "key"); 656 657 658 -- 606 659 -- Name: content_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace: 607 660 -- … … 628 681 629 682 -- 683 -- Name: content_shoutbox_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace: 684 -- 685 686 ALTER TABLE ONLY content_shoutbox_messages 687 ADD CONSTRAINT content_shoutbox_messages_pkey PRIMARY KEY (message_content_id); 688 689 690 -- 630 691 -- Name: files_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace: 631 692 -- … … 822 883 823 884 -- 885 -- Name: idx_gw_id; Type: INDEX; Schema: public; Owner: wifidog; Tablespace: 886 -- 887 888 CREATE UNIQUE INDEX idx_gw_id ON nodes USING btree (gw_id); 889 890 891 -- 824 892 -- Name: idx_token; Type: INDEX; Schema: public; Owner: wifidog; Tablespace: 825 893 -- … … 1123 1191 1124 1192 -- 1193 -- Name: content_key_value_pairs_content_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: wifidog 1194 -- 1195 1196 ALTER TABLE ONLY content_key_value_pairs 1197 ADD CONSTRAINT content_key_value_pairs_content_id_fkey FOREIGN KEY (content_id) REFERENCES content(content_id) ON UPDATE CASCADE ON DELETE CASCADE; 1198 1199 1200 -- 1201 -- Name: content_shoutbox_messages_author_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: wifidog 1202 -- 1203 1204 ALTER TABLE ONLY content_shoutbox_messages 1205 ADD CONSTRAINT content_shoutbox_messages_author_user_id_fkey FOREIGN KEY (author_user_id) REFERENCES users(user_id) ON UPDATE CASCADE ON DELETE CASCADE; 1206 1207 1208 -- 1209 -- Name: content_shoutbox_messages_message_content_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: wifidog 1210 -- 1211 1212 ALTER TABLE ONLY content_shoutbox_messages 1213 ADD CONSTRAINT content_shoutbox_messages_message_content_id_fkey FOREIGN KEY (message_content_id) REFERENCES content(content_id) ON UPDATE CASCADE ON DELETE CASCADE; 1214 1215 1216 -- 1217 -- Name: content_shoutbox_messages_origin_node_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: wifidog 1218 -- 1219 1220 ALTER TABLE ONLY content_shoutbox_messages 1221 ADD CONSTRAINT content_shoutbox_messages_origin_node_id_fkey FOREIGN KEY (origin_node_id) REFERENCES nodes(node_id) ON UPDATE CASCADE ON DELETE CASCADE; 1222 1223 1224 -- 1225 -- Name: content_shoutbox_messages_shoutbox_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: wifidog 1226 -- 1227 1228 ALTER TABLE ONLY content_shoutbox_messages 1229 ADD CONSTRAINT content_shoutbox_messages_shoutbox_id_fkey FOREIGN KEY (shoutbox_id) REFERENCES content(content_id) ON UPDATE CASCADE ON DELETE CASCADE; 1230 1231 1232 -- 1125 1233 -- Name: display_location_fkey; Type: FK CONSTRAINT; Schema: public; Owner: wifidog 1126 1234 --
