about summary refs log tree commit diff stats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170629184901_create_ckeditor_assets.rb23
-rw-r--r--db/schema.rb15
2 files changed, 37 insertions, 1 deletions
diff --git a/db/migrate/20170629184901_create_ckeditor_assets.rb b/db/migrate/20170629184901_create_ckeditor_assets.rb new file mode 100644 index 0000000..da986fd --- /dev/null +++ b/db/migrate/20170629184901_create_ckeditor_assets.rb
@@ -0,0 +1,23 @@
1class CreateCkeditorAssets < ActiveRecord::Migration[5.1]
2 def self.up
3 create_table :ckeditor_assets do |t|
4 t.string :data_file_name, null: false
5 t.string :data_content_type
6 t.integer :data_file_size
7 t.string :data_fingerprint
8 t.string :type, limit: 30
9
10 # Uncomment it to save images dimensions, if your need it
11 t.integer :width
12 t.integer :height
13
14 t.timestamps null: false
15 end
16
17 add_index :ckeditor_assets, :type
18 end
19
20 def self.down
21 drop_table :ckeditor_assets
22 end
23end
diff --git a/db/schema.rb b/db/schema.rb index b690393..c7c82ac 100644 --- a/db/schema.rb +++ b/db/schema.rb
@@ -10,7 +10,20 @@
10# 10#
11# It's strongly recommended that you check this file into your version control system. 11# It's strongly recommended that you check this file into your version control system.
12 12
13ActiveRecord::Schema.define(version: 20170625151955) do 13ActiveRecord::Schema.define(version: 20170629184901) do
14
15 create_table "ckeditor_assets", force: :cascade do |t|
16 t.string "data_file_name", null: false
17 t.string "data_content_type"
18 t.integer "data_file_size"
19 t.string "data_fingerprint"
20 t.string "type", limit: 30
21 t.integer "width"
22 t.integer "height"
23 t.datetime "created_at", null: false
24 t.datetime "updated_at", null: false
25 t.index ["type"], name: "index_ckeditor_assets_on_type"
26 end
14 27
15 create_table "entries", force: :cascade do |t| 28 create_table "entries", force: :cascade do |t|
16 t.string "title" 29 t.string "title"