Initial commit
This commit is contained in:
12
db/migrate/20191122151630_create_data_storages.rb
Normal file
12
db/migrate/20191122151630_create_data_storages.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateDataStorages < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :data_storages do |t|
|
||||
t.bigint :user_id, null: false, unsigned: true
|
||||
t.string :title, limit: 64, null: false
|
||||
t.text :data, limit: 5120, null: false
|
||||
|
||||
t.timestamps
|
||||
t.index [:user_id, :title], unique: true
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user