about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-03-22 15:46:58 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-03-22 15:46:58 +0100
commit22e06a4077bef6317e72385a05052105f3804d68 (patch)
tree5c9259f91cdcf11f6f040f597962cea87e83c363 /db
parent763738622802eddbb7e3d3ecfe11ee6c2207d413 (diff)
Upgrade status IDs to bigint
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb15
-rw-r--r--db/schema.rb22
2 files changed, 26 insertions, 11 deletions
diff --git a/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb b/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb
new file mode 100644
index 000000000..16b5db7dd
--- /dev/null
+++ b/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb
@@ -0,0 +1,15 @@
+class ChangePrimaryKeyToBigintOnStatuses < ActiveRecord::Migration[5.0]
+  def change
+    change_column :statuses, :id, :bigint
+    change_column :statuses, :reblog_of_id, :bigint
+    change_column :statuses, :in_reply_to_id, :bigint
+
+    change_column :media_attachments, :status_id, :bigint
+    change_column :mentions, :status_id, :bigint
+    change_column :notifications, :activity_id, :bigint
+    change_column :preview_cards, :status_id, :bigint
+    change_column :reports, :status_ids, :bigint, array: true
+    change_column :statuses_tags, :status_id, :bigint
+    change_column :stream_entries, :activity_id, :bigint
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 3ace2e32e..44b52c220 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
 #
 # It's strongly recommended that you check this file into your version control system.
 
-ActiveRecord::Schema.define(version: 20170322021028) do
+ActiveRecord::Schema.define(version: 20170322143850) do
 
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
@@ -91,7 +91,7 @@ ActiveRecord::Schema.define(version: 20170322021028) do
   end
 
   create_table "media_attachments", force: :cascade do |t|
-    t.integer  "status_id"
+    t.bigint   "status_id"
     t.string   "file_file_name"
     t.string   "file_content_type"
     t.integer  "file_file_size"
@@ -108,7 +108,7 @@ ActiveRecord::Schema.define(version: 20170322021028) do
 
   create_table "mentions", force: :cascade do |t|
     t.integer  "account_id"
-    t.integer  "status_id"
+    t.bigint   "status_id"
     t.datetime "created_at", null: false
     t.datetime "updated_at", null: false
     t.index ["account_id", "status_id"], name: "index_mentions_on_account_id_and_status_id", unique: true, using: :btree
@@ -124,7 +124,7 @@ ActiveRecord::Schema.define(version: 20170322021028) do
 
   create_table "notifications", force: :cascade do |t|
     t.integer  "account_id"
-    t.integer  "activity_id"
+    t.bigint   "activity_id"
     t.string   "activity_type"
     t.datetime "created_at",      null: false
     t.datetime "updated_at",      null: false
@@ -172,7 +172,7 @@ ActiveRecord::Schema.define(version: 20170322021028) do
   end
 
   create_table "preview_cards", force: :cascade do |t|
-    t.integer  "status_id"
+    t.bigint   "status_id"
     t.string   "url",                default: "", null: false
     t.string   "title"
     t.string   "description"
@@ -188,7 +188,7 @@ ActiveRecord::Schema.define(version: 20170322021028) do
   create_table "reports", force: :cascade do |t|
     t.integer  "account_id",                        null: false
     t.integer  "target_account_id",                 null: false
-    t.integer  "status_ids",        default: [],    null: false, array: true
+    t.bigint   "status_ids",        default: [],    null: false, array: true
     t.text     "comment",           default: "",    null: false
     t.boolean  "action_taken",      default: false, null: false
     t.datetime "created_at",                        null: false
@@ -205,14 +205,14 @@ ActiveRecord::Schema.define(version: 20170322021028) do
     t.index ["thing_type", "thing_id", "var"], name: "index_settings_on_thing_type_and_thing_id_and_var", unique: true, using: :btree
   end
 
-  create_table "statuses", force: :cascade do |t|
+  create_table "statuses", id: :bigserial, force: :cascade do |t|
     t.string   "uri"
     t.integer  "account_id",                             null: false
     t.text     "text",                   default: "",    null: false
     t.datetime "created_at",                             null: false
     t.datetime "updated_at",                             null: false
-    t.integer  "in_reply_to_id"
-    t.integer  "reblog_of_id"
+    t.bigint   "in_reply_to_id"
+    t.bigint   "reblog_of_id"
     t.string   "url"
     t.boolean  "sensitive",              default: false
     t.integer  "visibility",             default: 0,     null: false
@@ -227,14 +227,14 @@ ActiveRecord::Schema.define(version: 20170322021028) do
   end
 
   create_table "statuses_tags", id: false, force: :cascade do |t|
-    t.integer "status_id", null: false
+    t.bigint  "status_id", null: false
     t.integer "tag_id",    null: false
     t.index ["tag_id", "status_id"], name: "index_statuses_tags_on_tag_id_and_status_id", unique: true, using: :btree
   end
 
   create_table "stream_entries", force: :cascade do |t|
     t.integer  "account_id"
-    t.integer  "activity_id"
+    t.bigint   "activity_id"
     t.string   "activity_type"
     t.datetime "created_at",                    null: false
     t.datetime "updated_at",                    null: false