Module: PgHaMigrations
- Defined in:
- lib/pg_ha_migrations.rb,
lib/pg_ha_migrations/version.rb,
lib/pg_ha_migrations/hacks/disable_ddl_transaction.rb,
lib/pg_ha_migrations/blocking_database_transactions.rb,
lib/pg_ha_migrations/hacks/cleanup_unnecessary_output.rb,
lib/pg_ha_migrations/blocking_database_transactions_reporter.rb
Defined Under Namespace
Modules: ActiveRecordHacks, AllowedVersions, AutoIncluder, DependentObjectsChecks, SafeStatements, UnsafeStatements Classes: BlockingDatabaseTransactions, BlockingDatabaseTransactionsReporter, Config, Railtie
Constant Summary collapse
- LOCK_TIMEOUT_SECONDS =
5
- LOCK_FAILURE_RETRY_DELAY_MULTLIPLIER =
5
- UnsafeMigrationError =
Safe versus unsafe in this context specifically means the following:
-
Safe operations will not block for long periods of time.
-
Unsafe operations may block for long periods of time.
-
Class.new(StandardError)
- InvalidMigrationError =
Invalid migrations are operations which we expect to not function as expected or get the schema into an inconsistent state
Class.new(StandardError)
- BestPracticeError =
Operations violating a best practice, but not actually unsafe will raise this error. For example, adding a column without a default and then setting its default in a second action in a single migration isn’t our documented best practice and will raise this error.
Class.new(Exception)
- UnsupportedMigrationError =
Unsupported migrations use ActiveRecord::Migration features that we don’t support, and therefore will likely have unexpected behavior.
Class.new(StandardError)
- UnsupportedAdapter =
This gem only supports the PostgreSQL adapter at this time.
Class.new(StandardError)
- VERSION =
"1.4.0"
Class Method Summary collapse
Class Method Details
.config ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/pg_ha_migrations.rb', line 15 def self.config @config ||= Config.new( true, false, true, false ) end |
.configure {|config| ... } ⇒ Object
24 25 26 |
# File 'lib/pg_ha_migrations.rb', line 24 def self.configure yield config end |