diff options
| author | Alban Peignier | 2017-03-21 16:12:46 +0100 | 
|---|---|---|
| committer | Alban Peignier | 2017-03-21 16:13:01 +0100 | 
| commit | b18a233d6f41803462b01988f1a3e5e7853b99b1 (patch) | |
| tree | 8a7ce4e5fad9bd77770c4ae5e84c0bac265f4293 /db | |
| parent | 4793ec9af659d72a049fa76f60d8a8a2f1abd906 (diff) | |
| download | chouette-core-b18a233d6f41803462b01988f1a3e5e7853b99b1.tar.bz2 | |
Manage (only) NetexImports in ImportsController. RefsĀ #2905
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20170321141620_add_type_to_imports.rb | 10 | ||||
| -rw-r--r-- | db/schema.rb | 3 | 
2 files changed, 12 insertions, 1 deletions
diff --git a/db/migrate/20170321141620_add_type_to_imports.rb b/db/migrate/20170321141620_add_type_to_imports.rb new file mode 100644 index 000000000..cba497ad1 --- /dev/null +++ b/db/migrate/20170321141620_add_type_to_imports.rb @@ -0,0 +1,10 @@ +class AddTypeToImports < ActiveRecord::Migration +  def up +    add_column :imports, :type, :string +    execute "update imports set type = 'netex_import' where type is null" +  end + +  def down +    remove_column :imports, :type, :string +  end +end diff --git a/db/schema.rb b/db/schema.rb index 33d99ee9e..61a8042d2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@  #  # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170320125813) do +ActiveRecord::Schema.define(version: 20170321141620) do    # These are extensions that must be enabled in order to support this database    enable_extension "plpgsql" @@ -299,6 +299,7 @@ ActiveRecord::Schema.define(version: 20170320125813) do      t.datetime "started_at"      t.datetime "ended_at"      t.string   "token_download" +    t.string   "type"    end    add_index "imports", ["referential_id"], :name => "index_imports_on_referential_id"  | 
