class Config < ActiveRecord::Base self.table_name = 'config' validates_presence_of :title validates_presence_of :timezone validates_presence_of :postsperpage end class CreateConfigTable < ActiveRecord::Migration[6.0] def change create_table :config do |t| t.string :title, null: false t.string :subtitle t.string :timezone, null: false t.integer :postsperpage, null: false end end end