Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
563 B

class CreateCsvVariableDefinitions < ActiveRecord::Migration[7.0]
def change
create_table :csv_variable_definitions do |t|
t.string :variable, null: false
t.string :definition, null: false
t.string :log_type, null: false
t.integer :year, null: false
t.datetime :last_accessed
t.timestamps
end
add_check_constraint :csv_variable_definitions, "log_type IN ('lettings', 'sales')", name: "log_type_check"
add_check_constraint :csv_variable_definitions, "year BETWEEN 2000 AND 2099", name: "year_check"
end
end