Sha256: b2f8a774e3d356914e363c47571ae520e162f6f65bc84dae951340b940cf0c65
Contents?: true
Size: 747 Bytes
Versions: 1
Compression:
Stored size: 747 Bytes
Contents
class CreateTables < ActiveRecord::Migration def self.up create_table :users do |t| t.string :name, nil: false, index: true t.string :api_code end create_table :urls do |t| t.string :url_pattern t.string :name t.string :http_method end create_table :user_groups do |t| t.string :name, nil: false, index: true end create_table :users_groups do |t| t.integer :user_group_id t.integer :user_id end create_table :users_urls do |t| t.integer :user_group_id t.integer :url_id end end def self.down drop_table :users_urls drop_table :users_groups drop_table :user_groups drop_table :users drop_table :urls end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
oauth_service-0.0.2 | test/dummy/db/migrate/20160514163909_create_tables.rb |