Class: GTFS::Meta::CreateFeedVersions
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- GTFS::Meta::CreateFeedVersions
- Defined in:
- lib/gtfs/meta/migrations/create_feed_versions.rb
Instance Method Summary collapse
-
#change ⇒ Object
TODO: re-construct this migration from a custom generator.
Instance Method Details
#change ⇒ Object
TODO: re-construct this migration from a custom generator
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/gtfs/meta/migrations/create_feed_versions.rb', line 6 def change create_table :feed_versions do |t| t.integer :feed_id, :null => false t.string :etag, :null => false t.datetime :last_modified_at, :null => false t.text :file_names t. end add_index :feed_versions, :feed_id add_index :feed_versions, [:feed_id, :etag, :last_modified_at], :unique => true, :name => "version_composite_key" end |