Sha256: 6358dcfb06e514a8f393deb33767bb76cce9da864e676328cce45354afbd6c2c

Contents?: true

Size: 907 Bytes

Versions: 20

Compression:

Stored size: 907 Bytes

Contents

class CreateUnidomChinaTowns < ActiveRecord::Migration

  def change

    create_table :unidom_china_towns, id: :uuid do |t|

      t.references :region, type: :uuid, null: false

      t.column :numeric_code, 'char(9)', null: false, default: '0'*9

      t.string  :name,    null: false, default: '', limit: 200
      t.boolean :virtual, null: false, default: false

      t.text :instruction
      t.text :description

      t.column   :state, 'char(1)', null: false, default: 'C'
      t.datetime :opened_at,        null: false, default: ::Time.utc(1970)
      t.datetime :closed_at,        null: false, default: ::Time.utc(3000)
      t.boolean  :defunct,          null: false, default: false
      t.jsonb    :notation,         null: false, default: {}

      t.timestamps null: false

    end

    add_index :unidom_china_towns, :region_id
    add_index :unidom_china_towns, :numeric_code

  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
unidom-geo-china-0.5.8 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.5.7 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.5.6 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.5.5 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.5.4 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.5.3 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.5.2 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.5.1 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.5 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.4.6 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.4.5 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.4.4 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.4.3 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.4.2 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.4.1 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.4 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.3.2 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.3.1 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.3 db/migrate/20010491560020_create_unidom_china_towns.rb
unidom-geo-china-0.2 db/migrate/20010491560020_create_unidom_china_towns.rb