mirror of
https://github.com/oonyeje/Pearlception_Website_RoR.git
synced 2025-12-25 11:47:41 +00:00
- When creating a new company as an admin, a new database containing models for Runs, Grades, Results, Machines, and Oysters is migrated and created - When a user registers, they are automatically switched to their company's db in the server - When a user signs in they are also automatically swithched
20 lines
576 B
Ruby
20 lines
576 B
Ruby
class CreateGrades < ActiveRecord::Migration[5.0]
|
|
def change
|
|
create_table :grades do |t|
|
|
t.string :Full_name, limit: 100, :null => false
|
|
t.string :Short_name, limit: 10, :null => false
|
|
t.column :Volume_max, :double
|
|
t.column :Volume_min, :double
|
|
t.column :Length_max, :double
|
|
t.column :Length_min, :double
|
|
t.column :Width_max, :double
|
|
t.column :Width_min, :double
|
|
t.column :Height_max, :double
|
|
t.column :Height_min, :double
|
|
|
|
t.timestamps
|
|
end
|
|
add_index :grades, :Short_name, unique: true
|
|
end
|
|
end
|