foodsoft/db/migrate/20130718183100_create_settings.rb
Philipp Rothmann fb2b4d8a8a chore: rubocop
chore: fix api test conventions

chore: rubocop -A spec/

chore: more rubocop -A

fix failing test

rubocop fixes

removes helper methods that are in my opinion dead code

more rubocop fixes

rubocop -a --auto-gen-config
2023-06-09 17:35:05 +02:00

17 lines
408 B
Ruby

class CreateSettings < ActiveRecord::Migration[4.2]
def self.up
create_table :settings do |t|
t.string :var, null: false
t.text :value, null: true
t.integer :thing_id, null: true
t.string :thing_type, limit: 30, null: true
t.timestamps
end
add_index :settings, %i[thing_type thing_id var], unique: true
end
def self.down
drop_table :settings
end
end