Class: HasHelpersInitialSetup
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- HasHelpersInitialSetup
- Defined in:
- lib/generators/has_helpers/install/templates/migrate/has_helpers_initial_setup.rb
Overview
typed: false frozen_string_literal: true
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/generators/has_helpers/install/templates/migrate/has_helpers_initial_setup.rb', line 5 def change ################# #### Options #### ################# create_table :options do |t| t.string :type, limit: 63, null: false t.string :name, limit: 127, null: false t. null: false end add_index :options, [:type, :name], unique: true add_index :options, :name #################### #### Time Zones #### #################### create_table :time_zones do |t| t.string :name, limit: 127, null: false t.string :pg_timezone_name, limit: 127, null: false t. null: false end end |