cartodb-4.42/db/migrate/20200907111953_drop_automatic_geocoding_table.rb

23 lines
611 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
require 'carto/db/migration_helper'
include Carto::Db::MigrationHelper
migration(
Proc.new do
drop_table :automatic_geocodings
drop_column :geocodings, :automatic_geocoding_id
end,
Proc.new do
create_table :automatic_geocodings do
Uuid :id, primary_key: true, default: Sequel.lit('uuid_generate_v4()')
Integer :table_id
Text :state
DateTime :created_at, null: false
DateTime :updated_at, null: false
DateTime :ran_at
Integer :retried_times
end
add_column :geocodings, :automatic_geocoding_id, :integer
end
)