CREATE TABLE module (module_name varchar NOT NULL,is_enabled bool NOT NULL) ;
CREATE TABLE configuration (name varchar NOT NULL,value varchar NOT NULL,naml text NOT NULL) ;
CREATE TABLE file_site (name varchar NOT NULL,date_ timestamptz(6) DEFAULT now() NOT NULL,content bytea NOT NULL) ;
CREATE TABLE registration (key_ varchar NOT NULL,email varchar NOT NULL,old_password varchar,name varchar NOT NULL,date_ timestamptz(6) DEFAULT now() NOT NULL,next_url text,password_digest varchar NOT NULL) ;
CREATE TABLE site_property (key varchar NOT NULL,value varchar NOT NULL) ;
CREATE TABLE tweak (tweak_name varchar NOT NULL,content text NOT NULL) ;
CREATE TABLE version (version int4 NOT NULL,initial int4 NOT NULL) ;
CREATE TABLE paid (user_id int4 NOT NULL,paid_until date NOT NULL) ;
CREATE TABLE view_count (node_id int4 NOT NULL,views int4 NOT NULL) ;
CREATE TABLE file_avatar (user_id int4 NOT NULL,name varchar NOT NULL,date_ timestamptz(6) DEFAULT now() NOT NULL,content bytea NOT NULL) ;
CREATE TABLE tag (node_id int4,user_id int4,label varchar NOT NULL,when_tagged timestamptz(6) DEFAULT now() NOT NULL) ;
CREATE TABLE user_property (user_id int4 NOT NULL,key varchar NOT NULL,value varchar NOT NULL) ;
CREATE TABLE file_temp (user_id int4 NOT NULL,name varchar NOT NULL,date_ timestamptz(6) DEFAULT now() NOT NULL,content bytea NOT NULL) ;
CREATE TABLE subscription (node_id int4 NOT NULL,direct_only bool NOT NULL,daily_digest bool DEFAULT false NOT NULL,user_id int4 NOT NULL) ;
CREATE TABLE user_ (user_id int4 DEFAULT nextval('user__user_id_seq'::regclass) NOT NULL,email varchar NOT NULL,old_password varchar,name varchar NOT NULL,joined timestamptz(6) DEFAULT now() NOT NULL,registered timestamptz(6),no_archive bool,signature text,signature_format bpchar(1),old_signature_checked int4,bounces int4,password_digest varchar) ;
ALTER SEQUENCE user__user_id_seq OWNED BY user_.user_id ;
CREATE TABLE mailing_list (node_id int4 NOT NULL,list_address varchar NOT NULL,list_name varchar,list_home_url varchar NOT NULL,ignore_no_archive bool DEFAULT false,plain_text_only bool DEFAULT false,list_server varchar NOT NULL,email_id varchar,export_owner varchar,old_ui_hidden bool) ;
CREATE TABLE file_node (node_id int4 NOT NULL,name varchar NOT NULL,date_ timestamptz(6) DEFAULT now() NOT NULL,content bytea NOT NULL) ;
CREATE TABLE visited (user_id int4 NOT NULL,node_id int4 NOT NULL,last_node_id int4 NOT NULL) ;
CREATE TABLE site (ad_free int4,root_node_id int4 NOT NULL,old_ad_type varchar,one int4 DEFAULT 1 NOT NULL,old_content_type varchar,when_created timestamptz(6) DEFAULT now() NOT NULL,is_safe bool DEFAULT true NOT NULL,ad_credits_for_users bool DEFAULT false NOT NULL,monthly_views int4 DEFAULT 0 NOT NULL) ;
CREATE TABLE node_msg (node_id int4 NOT NULL,message text NOT NULL) ;
CREATE TABLE node (node_id int4 DEFAULT nextval('node_node_id_seq'::regclass) NOT NULL,parent_id int4,when_created timestamptz(6) NOT NULL,subject varchar NOT NULL,msg_fmt bpchar(1) NOT NULL,message_id varchar,when_updated timestamptz(6),guessed_parent bool DEFAULT false,parent_message_id varchar,when_sent timestamptz(6),last_node_id int4,last_node_date timestamptz(6) DEFAULT now() NOT NULL,node_count int4 DEFAULT 1 NOT NULL,is_app bool,pin int4,redirect varchar,assigned_priority int4,child_count int4 DEFAULT 0 NOT NULL,cookie varchar,anonymous_name varchar,type varchar,exported_node_id int4,export_permalink varchar,export_email varchar,owner_id int4,assigned_user int4,embedding_url varchar,poll_option_count int4) ;
ALTER SEQUENCE node_node_id_seq OWNED BY node.node_id ;
CREATE TABLE node_property (node_id int4 NOT NULL,key varchar NOT NULL,value varchar NOT NULL) ;
