Class: CreateOfacSdns

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/ofac_migration/build/templates/create_ofac_sdns.rb

Class Method Summary collapse

Class Method Details

.downObject



28
29
30
# File 'lib/generators/ofac_migration/build/templates/create_ofac_sdns.rb', line 28

def self.down
  drop_table :ofac_sdns
end

.upObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/generators/ofac_migration/build/templates/create_ofac_sdns.rb', line 3

def self.up
  create_table :ofac_sdns do |t|
    t.text      :name
    t.string    :sdn_type
    t.string    :program
    t.string    :title
    t.string    :vessel_call_sign
    t.string    :vessel_type
    t.string    :vessel_tonnage
    t.string    :gross_registered_tonnage
    t.string    :vessel_flag
    t.string    :vessel_owner
    t.text      :remarks
    t.text      :address
    t.string    :city
    t.string    :country
    t.string    :address_remarks
    t.string    :alternate_identity_type
    t.text      :alternate_identity_name
    t.string    :alternate_identity_remarks
    t.timestamps
  end
  add_index :ofac_sdns, :sdn_type
end