about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-09-14 00:04:30 +0200
committerGitHub <noreply@github.com>2017-09-14 00:04:30 +0200
commit9239e4ce4d4e958e62552d4a01183d0295c020f5 (patch)
tree8f33707c027e2c10b62c0c6fffe1eb3bf27d38ef /db
parent06f26e09b4bff120181eaaeb70a833482368ea63 (diff)
Uploads for admin site settings (#4913)
* Improve OpenGraph tags for about pages

* Add thumbnail admin setting

* Fix error

* Fix up
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170913000752_create_site_uploads.rb10
-rw-r--r--db/schema.rb14
2 files changed, 23 insertions, 1 deletions
diff --git a/db/migrate/20170913000752_create_site_uploads.rb b/db/migrate/20170913000752_create_site_uploads.rb
new file mode 100644
index 000000000..2246e48cd
--- /dev/null
+++ b/db/migrate/20170913000752_create_site_uploads.rb
@@ -0,0 +1,10 @@
+class CreateSiteUploads < ActiveRecord::Migration[5.1]
+  def change
+    create_table :site_uploads do |t|
+      t.string :var, default: '', null: false, index: { unique: true }
+      t.attachment :file
+      t.json :meta
+      t.timestamps
+    end
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
index d8af0a1f8..f2ca2af69 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: 20170905165803) do
+ActiveRecord::Schema.define(version: 20170913000752) do
 
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
@@ -288,6 +288,18 @@ ActiveRecord::Schema.define(version: 20170905165803) do
     t.index ["thing_type", "thing_id", "var"], name: "index_settings_on_thing_type_and_thing_id_and_var", unique: true
   end
 
+  create_table "site_uploads", force: :cascade do |t|
+    t.string "var", default: "", null: false
+    t.string "file_file_name"
+    t.string "file_content_type"
+    t.integer "file_file_size"
+    t.datetime "file_updated_at"
+    t.json "meta"
+    t.datetime "created_at", null: false
+    t.datetime "updated_at", null: false
+    t.index ["var"], name: "index_site_uploads_on_var", unique: true
+  end
+
   create_table "status_pins", force: :cascade do |t|
     t.bigint "account_id", null: false
     t.bigint "status_id", null: false