diff options
Diffstat (limited to 'db/migrate/20170629184901_create_ckeditor_assets.rb')
-rw-r--r-- | db/migrate/20170629184901_create_ckeditor_assets.rb | 23 |
1 files changed, 23 insertions, 0 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 @@ | |||
1 | class 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 | ||
23 | end | ||