20121225162100_create_package.rb 907 B

1234567891011121314151617181920212223
  1. class CreatePackage < ActiveRecord::Migration
  2. def up
  3. create_table :packages do |t|
  4. t.column :name, :string, :limit => 250, :null => false
  5. t.column :version, :string, :limit => 50, :null => false
  6. t.column :vendor, :string, :limit => 150, :null => false
  7. t.column :state, :string, :limit => 50, :null => false
  8. t.column :updated_by_id, :integer, :null => false
  9. t.column :created_by_id, :integer, :null => false
  10. t.timestamps
  11. end
  12. create_table :package_migrations do |t|
  13. t.column :name, :string, :limit => 250, :null => false
  14. t.column :version, :string, :limit => 250, :null => false
  15. t.timestamps
  16. end
  17. end
  18. def down
  19. drop_table :packages
  20. drop_table :package_migrations
  21. end
  22. end