Sha256: cdd9b423b974e8ab089c712ce2888f1bcda6af9bcfb36255dd8ccfa5081aceb5

Contents?: true

Size: 1.42 KB

Versions: 10

Compression:

Stored size: 1.42 KB

Contents

class CreateMyreplicatorExports < ActiveRecord::Migration
  def change
    create_table :myreplicator_exports do |t|
      t.string :source_schema
      t.string :destination_schema
      t.string :table_name
      t.string :incremental_column
      t.string :max_incremental_value
      t.string :incremental_column_type
      t.string :export_to, :default => "destination_db"
      t.string :export_type, :default => "incremental"
      t.string :s3_path
      t.string :cron
      t.string :state, :default => "new"
      t.text :error
      t.boolean :active, :default => true
      t.integer :exporter_pid
      t.integer :transporter_pid
      t.integer :loader_pid
      t.datetime :export_started_at, :default => nil
      t.datetime :export_finished_at, :default => nil
      t.datetime :load_started_at, :default => nil
      t.datetime :load_finished_at, :default => nil
      t.datetime :transfer_started_at, :default => nil
      t.datetime :transfer_finished_at, :default => nil
      t.timestamps
      t.boolean :analyze_constraints, :default => false
      t.boolean :nightly_refresh, :default => false
      t.integer :nightly_refresh_frequency, :default => nil
      t.datetime :nightly_refresh_last_run, :default => nil
    end  
    add_index :myreplicator_exports, [:source_schema, :destination_schema, :table_name], :unique => true, :name => "unique_index"
  end

  def self.down
    drop_table :myreplicator_exports
  end
  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
myreplicator-1.1.51 db/migrate/20121025191622_create_myreplicator_exports.rb
myreplicator-1.1.50 db/migrate/20121025191622_create_myreplicator_exports.rb
myreplicator-1.1.49 db/migrate/20121025191622_create_myreplicator_exports.rb
myreplicator-1.1.48 db/migrate/20121025191622_create_myreplicator_exports.rb
myreplicator-1.1.47 db/migrate/20121025191622_create_myreplicator_exports.rb
myreplicator-1.1.46 db/migrate/20121025191622_create_myreplicator_exports.rb
myreplicator-1.1.45 db/migrate/20121025191622_create_myreplicator_exports.rb
myreplicator-1.1.44 db/migrate/20121025191622_create_myreplicator_exports.rb
myreplicator-1.1.43 db/migrate/20121025191622_create_myreplicator_exports.rb
myreplicator-1.1.42 db/migrate/20121025191622_create_myreplicator_exports.rb