dawarich/db/migrate/20240805150111_create_places.rb
2024-08-05 21:23:08 +02:00

18 lines
495 B
Ruby

# frozen_string_literal: true
class CreatePlaces < ActiveRecord::Migration[7.1]
def change
create_table :places do |t|
t.string :name, null: false
t.decimal :longitude, precision: 10, scale: 6, null: false
t.decimal :latitude, precision: 10, scale: 6, null: false
t.string :city
t.string :country
t.integer :source, default: 0
t.jsonb :geodata, default: {}, null: false
t.datetime :reverse_geocoded_at
t.timestamps
end
end
end