Show
Ignore:
Timestamp:
01/15/07 23:13:34 (6 years ago)
Author:
benoitg
Message:
  • Sync initial schema and translations
  • Minor spelling fixes
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/sql/wifidog-postgres-schema.sql

    r1158 r1168  
    33-- 
    44 
    5 SET client_encoding = 'UNICODE'; 
     5SET client_encoding = 'UTF8'; 
    66SET check_function_bodies = false; 
    77SET client_min_messages = warning; 
     
    1111-- 
    1212 
    13 CREATE DATABASE wifidog WITH TEMPLATE = template0 ENCODING = 'UNICODE'; 
     13CREATE DATABASE wifidog WITH TEMPLATE = template0 ENCODING = 'UTF8'; 
    1414 
    1515 
    1616\connect wifidog 
    1717 
    18 SET client_encoding = 'UNICODE'; 
     18SET client_encoding = 'UTF8'; 
    1919SET check_function_bodies = false; 
    2020SET client_min_messages = warning; 
     
    7777    long_description text, 
    7878    title_is_displayed boolean DEFAULT true NOT NULL, 
     79    last_update_timestamp timestamp without time zone DEFAULT now() NOT NULL, 
    7980    CONSTRAINT content_type_not_empty_string CHECK ((content_type <> ''::text)) 
    8081); 
     
    99100 
    100101 
     102SET default_with_oids = false; 
     103 
    101104-- 
    102105-- Name: content_clickthrough_log; Type: TABLE; Schema: public; Owner: wifidog; Tablespace:  
     
    104107 
    105108CREATE TABLE content_clickthrough_log ( 
    106     user_id text, 
     109    user_id text NOT NULL, 
    107110    content_id text NOT NULL, 
    108111    first_clickthrough_timestamp timestamp without time zone DEFAULT now() NOT NULL, 
     
    115118 
    116119 
     120SET default_with_oids = true; 
     121 
    117122-- 
    118123-- Name: content_display_log; Type: TABLE; Schema: public; Owner: wifidog; Tablespace:  
     
    153158    url text, 
    154159    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 
    158161); 
    159162 
     
    206209CREATE TABLE content_group ( 
    207210    content_group_id text NOT NULL, 
    208     is_artistic_content boolean DEFAULT false NOT NULL, 
    209     is_locative_content boolean DEFAULT false NOT NULL, 
    210211    content_changes_on_mode text DEFAULT 'ALWAYS'::text NOT NULL, 
    211212    content_ordering_mode text DEFAULT 'RANDOM'::text NOT NULL, 
     
    266267 
    267268 
     269SET default_with_oids = false; 
     270 
     271-- 
     272-- Name: content_key_value_pairs; Type: TABLE; Schema: public; Owner: wifidog; Tablespace:  
     273-- 
     274 
     275CREATE TABLE content_key_value_pairs ( 
     276    content_id text NOT NULL, 
     277    "key" text NOT NULL, 
     278    value text 
     279); 
     280 
     281 
     282SET default_with_oids = true; 
     283 
    268284-- 
    269285-- Name: content_langstring_entries; Type: TABLE; Schema: public; Owner: wifidog; Tablespace:  
     
    286302    number_of_display_items integer DEFAULT 10 NOT NULL, 
    287303    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 
    289308); 
    290309 
     
    302321); 
    303322 
     323 
     324SET default_with_oids = false; 
     325 
     326-- 
     327-- Name: content_shoutbox_messages; Type: TABLE; Schema: public; Owner: wifidog; Tablespace:  
     328-- 
     329 
     330CREATE 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 
     339SET default_with_oids = true; 
    304340 
    305341-- 
     
    440476    last_paged timestamp without time zone, 
    441477    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 
    443480); 
    444481 
     
    556593 
    557594-- 
     595-- Name: content_clickthrough_log_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace:  
     596-- 
     597 
     598ALTER 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-- 
    558603-- Name: content_display_location_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace:  
    559604-- 
     
    564609 
    565610-- 
     611-- Name: content_display_log_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace:  
     612-- 
     613 
     614ALTER TABLE ONLY content_display_log 
     615    ADD CONSTRAINT content_display_log_pkey PRIMARY KEY (content_id, user_id, node_id); 
     616 
     617 
     618-- 
    566619-- Name: content_group_element_has_allowed_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace:  
    567620-- 
     
    580633 
    581634-- 
    582 -- Name: content_group_element_portal_display_log_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace:  
    583 -- 
    584  
    585 ALTER TABLE ONLY content_display_log 
    586     ADD CONSTRAINT content_group_element_portal_display_log_pkey PRIMARY KEY (user_id, content_id, node_id); 
    587  
    588  
    589 -- 
    590635-- Name: content_group_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace:  
    591636-- 
     
    604649 
    605650-- 
     651-- Name: content_key_value_pairs_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace:  
     652-- 
     653 
     654ALTER TABLE ONLY content_key_value_pairs 
     655    ADD CONSTRAINT content_key_value_pairs_pkey PRIMARY KEY (content_id, "key"); 
     656 
     657 
     658-- 
    606659-- Name: content_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace:  
    607660-- 
     
    628681 
    629682-- 
     683-- Name: content_shoutbox_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace:  
     684-- 
     685 
     686ALTER TABLE ONLY content_shoutbox_messages 
     687    ADD CONSTRAINT content_shoutbox_messages_pkey PRIMARY KEY (message_content_id); 
     688 
     689 
     690-- 
    630691-- Name: files_pkey; Type: CONSTRAINT; Schema: public; Owner: wifidog; Tablespace:  
    631692-- 
     
    822883 
    823884-- 
     885-- Name: idx_gw_id; Type: INDEX; Schema: public; Owner: wifidog; Tablespace:  
     886-- 
     887 
     888CREATE UNIQUE INDEX idx_gw_id ON nodes USING btree (gw_id); 
     889 
     890 
     891-- 
    824892-- Name: idx_token; Type: INDEX; Schema: public; Owner: wifidog; Tablespace:  
    825893-- 
     
    11231191 
    11241192-- 
     1193-- Name: content_key_value_pairs_content_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: wifidog 
     1194-- 
     1195 
     1196ALTER 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 
     1204ALTER 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 
     1212ALTER 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 
     1220ALTER 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 
     1228ALTER 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-- 
    11251233-- Name: display_location_fkey; Type: FK CONSTRAINT; Schema: public; Owner: wifidog 
    11261234--