about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160905150353_create_media_attachments.rb14
-rw-r--r--db/schema.rb15
2 files changed, 28 insertions, 1 deletions
diff --git a/db/migrate/20160905150353_create_media_attachments.rb b/db/migrate/20160905150353_create_media_attachments.rb
new file mode 100644
index 000000000..32d0897d8
--- /dev/null
+++ b/db/migrate/20160905150353_create_media_attachments.rb
@@ -0,0 +1,14 @@
+class CreateMediaAttachments < ActiveRecord::Migration[5.0]
+  def change
+    create_table :media_attachments do |t|
+      t.integer :status_id, null: true, default: nil
+      t.attachment :file
+      t.string :remote_url, null: false, default: ''
+      t.integer :account_id
+
+      t.timestamps
+    end
+
+    add_index :media_attachments, :status_id
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
index b63df0fea..4a3078e64 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: 20160826155805) do
+ActiveRecord::Schema.define(version: 20160905150353) do
 
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
@@ -59,6 +59,19 @@ ActiveRecord::Schema.define(version: 20160826155805) do
     t.index ["account_id", "target_account_id"], name: "index_follows_on_account_id_and_target_account_id", unique: true, using: :btree
   end
 
+  create_table "media_attachments", force: :cascade do |t|
+    t.integer  "status_id"
+    t.string   "file_file_name"
+    t.string   "file_content_type"
+    t.integer  "file_file_size"
+    t.datetime "file_updated_at"
+    t.string   "remote_url",        default: "", null: false
+    t.integer  "account_id"
+    t.datetime "created_at",                     null: false
+    t.datetime "updated_at",                     null: false
+    t.index ["status_id"], name: "index_media_attachments_on_status_id", using: :btree
+  end
+
   create_table "mentions", force: :cascade do |t|
     t.integer  "account_id"
     t.integer  "status_id"