canvas-lms/db/migrate/20150507151545_create_bookm...

21 lines
447 B
Ruby

class CreateBookmarks < ActiveRecord::Migration
tag :predeploy
def up
create_table :bookmarks_bookmarks do |t|
t.integer :user_id, limit: 8, null: false
t.string :name, null: false
t.string :url, null: false
t.integer :position
t.text :json
end
add_foreign_key :bookmarks_bookmarks, :users
add_index :bookmarks_bookmarks, :user_id
end
def down
drop_table :bookmarks_bookmarks
end
end