]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - db/08to09.sql
parse_url returns an associative array - not an object
[quix0rs-gnu-social.git] / db / 08to09.sql
index 8d463fab4cbff9b2f66da2b0172e440dde754683..b10e47dbcb67f769f1577c046c9222e0e772c600 100644 (file)
@@ -4,8 +4,10 @@ alter table notice
      add column lon decimal(10,7) comment 'longitude',
      add column location_id integer comment 'location id if possible',
      add column location_ns integer comment 'namespace for location',
+     add column repeat_of integer comment 'notice this is a repeat of' references notice (id),
      drop index notice_profile_id_idx,
-     add index notice_profile_id_idx (profile_id,created,id);
+     add index notice_profile_id_idx (profile_id,created,id),
+     add index notice_repeatof_idx (repeat_of);
 
 alter table message
      modify column content text comment 'message content';
@@ -72,4 +74,39 @@ create table location_namespace (
     created datetime not null comment 'date the record was created',
     modified timestamp comment 'date this record was modified'
 
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
\ No newline at end of file
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+
+create table login_token (
+    user_id integer not null comment 'user owning this token' references user (id),
+    token char(32) not null comment 'token useable for logging in',
+    created datetime not null comment 'date this record was created',
+    modified timestamp comment 'date this record was modified',
+
+    constraint primary key (user_id)
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+
+create table user_location_prefs (
+    user_id integer not null comment 'user who has the preference' references user (id),
+    share_location tinyint default 1 comment 'Whether to share location data',
+    created datetime not null comment 'date this record was created',
+    modified timestamp comment 'date this record was modified',
+
+    constraint primary key (user_id)
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+
+create table queue_item_new (
+    id integer auto_increment primary key comment 'unique identifier',
+    frame blob not null comment 'data: object reference or opaque string',
+    transport varchar(8) not null comment 'queue for what? "email", "jabber", "sms", "irc", ...',
+    created datetime not null comment 'date this record was created',
+    claimed datetime comment 'date this item was claimed',
+
+    index queue_item_created_idx (created)
+
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+
+insert into queue_item_new (frame,transport,created,claimed)
+    select notice_id,transport,created,claimed from queue_item;
+alter table queue_item rename to queue_item_old;
+alter table queue_item_new rename to queue_item;
+