diff options
Diffstat (limited to 'install/schema_postgres.sql')
-rw-r--r-- | install/schema_postgres.sql | 85 |
1 files changed, 22 insertions, 63 deletions
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index 389cc6a84..0249d447a 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -16,8 +16,6 @@ CREATE TABLE "abook" ( "abook_account" bigint NOT NULL, "abook_channel" bigint NOT NULL, "abook_xchan" text NOT NULL DEFAULT '', - "abook_my_perms" bigint NOT NULL DEFAULT '0', - "abook_their_perms" bigint NOT NULL DEFAULT '0', "abook_closeness" numeric(3) NOT NULL DEFAULT '99', "abook_created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "abook_updated" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', @@ -33,7 +31,7 @@ CREATE TABLE "abook" ( "abook_self" smallint NOT NULL DEFAULT '0', "abook_feed" smallint NOT NULL DEFAULT '0', "abook_not_here" smallint NOT NULL DEFAULT '0', - "abook_profile" char(64) NOT NULL DEFAULT '', + "abook_profile" varchar(64) NOT NULL DEFAULT '', "abook_incl" TEXT NOT NULL DEFAULT '', "abook_excl" TEXT NOT NULL DEFAULT '', "abook_instance" TEXT NOT NULL DEFAULT '', @@ -42,8 +40,6 @@ CREATE TABLE "abook" ( create index "abook_account" on abook ("abook_account"); create index "abook_channel" on abook ("abook_channel"); create index "abook_xchan" on abook ("abook_xchan"); - create index "abook_my_perms" on abook ("abook_my_perms"); - create index "abook_their_perms" on abook ("abook_their_perms"); create index "abook_closeness" on abook ("abook_closeness"); create index "abook_created" on abook ("abook_created"); create index "abook_updated" on abook ("abook_updated"); @@ -66,7 +62,7 @@ CREATE TABLE "account" ( "account_id" serial NOT NULL, "account_parent" bigint NOT NULL DEFAULT '0', "account_default_channel" bigint NOT NULL DEFAULT '0', - "account_salt" char(32) NOT NULL DEFAULT '', + "account_salt" varchar(32) NOT NULL DEFAULT '', "account_password" text NOT NULL DEFAULT '', "account_email" text NOT NULL DEFAULT '', "account_external" text NOT NULL DEFAULT '', @@ -261,24 +257,6 @@ CREATE TABLE "channel" ( "channel_allow_gid" text , "channel_deny_cid" text , "channel_deny_gid" text , - "channel_r_stream" bigint NOT NULL DEFAULT '128', - "channel_r_profile" bigint NOT NULL DEFAULT '128', - "channel_r_photos" bigint NOT NULL DEFAULT '128', - "channel_r_abook" bigint NOT NULL DEFAULT '128', - "channel_w_stream" bigint NOT NULL DEFAULT '128', - "channel_w_wall" bigint NOT NULL DEFAULT '128', - "channel_w_tagwall" bigint NOT NULL DEFAULT '128', - "channel_w_comment" bigint NOT NULL DEFAULT '128', - "channel_w_mail" bigint NOT NULL DEFAULT '128', - "channel_w_photos" bigint NOT NULL DEFAULT '128', - "channel_w_chat" bigint NOT NULL DEFAULT '128', - "channel_a_delegate" bigint NOT NULL DEFAULT '0', - "channel_r_storage" bigint NOT NULL DEFAULT '128', - "channel_w_storage" bigint NOT NULL DEFAULT '128', - "channel_r_pages" bigint NOT NULL DEFAULT '128', - "channel_w_pages" bigint NOT NULL DEFAULT '128', - "channel_a_republish" bigint NOT NULL DEFAULT '128', - "channel_w_like" bigint NOT NULL DEFAULT '128', "channel_removed" smallint NOT NULL DEFAULT '0', "channel_system" smallint NOT NULL DEFAULT '0', "channel_moved" text NOT NULL DEFAULT '', @@ -298,28 +276,10 @@ create index "channel_pageflags" on channel ("channel_pageflags"); create index "channel_max_anon_mail" on channel ("channel_max_anon_mail"); create index "channel_max_friend_req" on channel ("channel_max_friend_req"); create index "channel_default_gid" on channel ("channel_default_group"); -create index "channel_r_stream" on channel ("channel_r_stream"); -create index "channel_r_profile" on channel ("channel_r_profile"); -create index "channel_r_photos" on channel ("channel_r_photos"); -create index "channel_r_abook" on channel ("channel_r_abook"); -create index "channel_w_stream" on channel ("channel_w_stream"); -create index "channel_w_wall" on channel ("channel_w_wall"); -create index "channel_w_tagwall" on channel ("channel_w_tagwall"); -create index "channel_w_comment" on channel ("channel_w_comment"); -create index "channel_w_mail" on channel ("channel_w_mail"); -create index "channel_w_photos" on channel ("channel_w_photos"); -create index "channel_w_chat" on channel ("channel_w_chat"); create index "channel_guid" on channel ("channel_guid"); create index "channel_hash" on channel ("channel_hash"); create index "channel_expire_days" on channel ("channel_expire_days"); -create index "channel_a_delegate" on channel ("channel_a_delegate"); -create index "channel_r_storage" on channel ("channel_r_storage"); -create index "channel_w_storage" on channel ("channel_w_storage"); -create index "channel_r_pages" on channel ("channel_r_pages"); -create index "channel_w_pages" on channel ("channel_w_pages"); create index "channel_deleted" on channel ("channel_deleted"); -create index "channel_a_republish" on channel ("channel_a_republish"); -create index "channel_w_like" on channel ("channel_w_like"); create index "channel_dirdate" on channel ("channel_dirdate"); create index "channel_lastpost" on channel ("channel_lastpost"); create index "channel_removed" on channel ("channel_removed"); @@ -342,7 +302,7 @@ CREATE TABLE "chatpresence" ( "cp_xchan" text NOT NULL DEFAULT '', "cp_last" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "cp_status" text NOT NULL, - "cp_client" char(128) NOT NULL DEFAULT '', + "cp_client" varchar(128) NOT NULL DEFAULT '', PRIMARY KEY ("cp_id") ); create index "cp_room" on chatpresence ("cp_room"); @@ -404,13 +364,13 @@ create index "conv_updated_idx" on conv ("updated"); CREATE TABLE IF NOT EXISTS "dreport" ( "dreport_id" serial NOT NULL, "dreport_channel" int NOT NULL DEFAULT '0', - "dreport_mid" char(255) NOT NULL DEFAULT '', - "dreport_site" char(255) NOT NULL DEFAULT '', - "dreport_recip" char(255) NOT NULL DEFAULT '', - "dreport_result" char(255) NOT NULL DEFAULT '', + "dreport_mid" varchar(255) NOT NULL DEFAULT '', + "dreport_site" varchar(255) NOT NULL DEFAULT '', + "dreport_recip" varchar(255) NOT NULL DEFAULT '', + "dreport_result" varchar(255) NOT NULL DEFAULT '', "dreport_time" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', - "dreport_xchan" char(255) NOT NULL DEFAULT '', - "dreport_queue" char(255) NOT NULL DEFAULT '', + "dreport_xchan" varchar(255) NOT NULL DEFAULT '', + "dreport_queue" varchar(255) NOT NULL DEFAULT '', PRIMARY KEY ("dreport_id") ); @@ -443,7 +403,7 @@ CREATE TABLE "event" ( "allow_gid" text NOT NULL, "deny_cid" text NOT NULL, "deny_gid" text NOT NULL, - "event_status" char(255) NOT NULL DEFAULT '', + "event_status" varchar(255) NOT NULL DEFAULT '', "event_status_date" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "event_percent" smallint NOT NULL DEFAULT '0', "event_repeat" text NOT NULL, @@ -613,7 +573,6 @@ CREATE TABLE "item" ( "resource_type" varchar(16) NOT NULL DEFAULT '', "attach" text NOT NULL, "sig" text NOT NULL DEFAULT '', - "diaspora_meta" text NOT NULL DEFAULT '', "location" text NOT NULL DEFAULT '', "coord" text NOT NULL DEFAULT '', "public_policy" text NOT NULL DEFAULT '', @@ -726,13 +685,13 @@ create index "itemid_iid" on item_id ("iid"); CREATE TABLE "likes" ( "id" serial NOT NULL, "channel_id" bigint NOT NULL DEFAULT '0', - "liker" char(128) NOT NULL DEFAULT '', - "likee" char(128) NOT NULL DEFAULT '', + "liker" varchar(128) NOT NULL DEFAULT '', + "likee" varchar(128) NOT NULL DEFAULT '', "iid" bigint NOT NULL DEFAULT '0', - "i_mid" char(255) NOT NULL DEFAULT '', + "i_mid" varchar(255) NOT NULL DEFAULT '', "verb" text NOT NULL DEFAULT '', "target_type" text NOT NULL DEFAULT '', - "target_id" char(128) NOT NULL DEFAULT '', + "target_id" varchar(128) NOT NULL DEFAULT '', "target" text NOT NULL, PRIMARY KEY ("id") ); @@ -753,7 +712,7 @@ CREATE TABLE "mail" ( "to_xchan" text NOT NULL DEFAULT '', "account_id" bigint NOT NULL DEFAULT '0', "channel_id" bigint NOT NULL DEFAULT '0', - "mail_mimetype" char(64) NOT NULL DEFAULT '0', + "mail_mimetype" varchar(64) NOT NULL DEFAULT '0', "title" text NOT NULL, "body" text NOT NULL, "sig" text NOT NULL, @@ -823,7 +782,7 @@ create index "mitem_menu_id" on menu_item ("mitem_menu_id"); create index "mitem_flags" on menu_item ("mitem_flags"); CREATE TABLE "notify" ( "id" serial NOT NULL, - "hash" char(64) NOT NULL, + "hash" varchar(64) NOT NULL, "xname" text NOT NULL, "url" text NOT NULL, "photo" text NOT NULL, @@ -850,14 +809,14 @@ create index "notify_otype" on notify ("otype"); create index "notify_aid" on notify ("aid"); CREATE TABLE "obj" ( "obj_id" serial NOT NULL, - "obj_page" char(64) NOT NULL DEFAULT '', + "obj_page" varchar(64) NOT NULL DEFAULT '', "obj_verb" text NOT NULL DEFAULT '', "obj_type" bigint NOT NULL DEFAULT 0, "obj_obj" text NOT NULL DEFAULT '', "obj_channel" bigint NOT NULL DEFAULT 0, - "obj_term" char(255) NOT NULL DEFAULT '', - "obj_url" char(255) NOT NULL DEFAULT '', - "obj_imgurl" char(255) NOT NULL DEFAULT '', + "obj_term" varchar(255) NOT NULL DEFAULT '', + "obj_url" varchar(255) NOT NULL DEFAULT '', + "obj_imgurl" varchar(255) NOT NULL DEFAULT '', "obj_created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "obj_edited" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "obj_quantity" bigint NOT NULL DEFAULT 0, @@ -1008,7 +967,7 @@ create index "profext_k" on profext ("k"); CREATE TABLE "profile" ( "id" serial NOT NULL, - "profile_guid" char(64) NOT NULL DEFAULT '', + "profile_guid" varchar(64) NOT NULL DEFAULT '', "aid" bigint NOT NULL DEFAULT '0', "uid" bigint NOT NULL, "profile_name" text NOT NULL, @@ -1218,7 +1177,7 @@ create index "tokens_uid" on tokens ("uid"); CREATE TABLE "updates" ( "ud_id" serial NOT NULL, - "ud_hash" char(128) NOT NULL, + "ud_hash" varchar(128) NOT NULL, "ud_guid" text NOT NULL DEFAULT '', "ud_date" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "ud_last" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', |