Sha256: a4b11da41b8ae535d19fd5e1e8d46bfe7212f393474df7a6e6044ea78059e6db

Contents?: true

Size: 535 Bytes

Versions: 2

Compression:

Stored size: 535 Bytes

Contents

Sequel.migration do
  change do
    create_table(:locations) do
      primary_key :id
      Float :latitude, null: false
      Float :longitude, null: false
      String :city, text: true
      String :state, text: true
      String :country, text: true
      DateTime :created_at
      check { (city !~ nil) | (state !~ nil) | (country !~ nil) }
    end

    alter_table(:photos) do
      add_column :city, String, text: true
      add_column :state, String, text: true
      add_column :country, String, text: true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
piccle-0.1.1.pre db/migrations/005_create_locations.rb
piccle-0.1.0.rc1 db/migrations/005_create_locations.rb