Show More
Commit Description:
add model solution
Commit Description:
add model solution
File last commit:
Show/Diff file:
Action:
db/migrate/004_create_languages.rb | 16 lines | 504 B | text/x-ruby | RubyLexer |
update migration
r822 class CreateLanguages < ActiveRecord::Migration[4.2]
pramook
initial commit...
r0 def self.up
update migration
r822 create_table :languages, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do |t|
pramook
initial commit...
r0 t.column :name, :string, :limit => 10
t.column :pretty_name, :string
end
Language.create(:name => "c", :pretty_name => "C")
Language.create(:name => "cpp", :pretty_name => "C++")
Language.create(:name => "pas", :pretty_name => "Pascal")
end
def self.down
drop_table :languages
end
end