Sha256: 7a0de31696f3ab328301fc41a1ec741862c03644b4257a39aae3ea5d948b1c09

Contents?: true

Size: 1.17 KB

Versions: 1

Compression:

Stored size: 1.17 KB

Contents

class CreateUnidomChinaMobilePhoneNumbers < ActiveRecord::Migration

  def change

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

      t.column :phone_number,                  'char(11)', null: false, default: '0'*11
      t.column :network_identification_number, 'char(3)',  null: false, default: '0'*3
      t.column :area_code,                     'char(4)',  null: false, default: '0'*4
      t.column :serial_number,                 'char(4)',  null: false, default: '0'*4

      t.boolean :text_message_verified, null: false, default: false
      t.boolean :voice_call_verified,   null: false, default: false

      t.text :instruction
      t.text :description

      t.column   :state, 'char(1)', null: false, default: Unidom::Common::STATE
      t.datetime :opened_at,        null: false, default: Unidom::Common::OPENED_AT
      t.datetime :closed_at,        null: false, default: Unidom::Common::CLOSED_AT
      t.boolean  :defunct,          null: false, default: false
      t.jsonb    :notation,         null: false, default: {}

      t.timestamps null: false

    end

    add_index :unidom_china_mobile_phone_numbers, :phone_number, unique: true

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unidom-contact-china-2.0 db/migrate/20010391560010_create_unidom_china_mobile_phone_numbers.rb