| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
If we want to have type decorators mess with the attribute, but not the
column, we need to stop type casting on the column. Where possible, we
changed the tests to test the value of `column_defaults`, which is
public API. `Column#default` is not.
|
|
|
|
| |
For consistency with https://github.com/rails/rails/pull/15557
|
| |
|
|
|
|
| |
Missed a case that only occured for mysql/mysql2
|
|
|
|
|
|
| |
With ActiveRecord::Properties, we now have a reasonable path for users
to continue to keep this behavior if they want it. This is an edge case
that has added a lot of complexity to the code base.
|
|
|
|
|
|
|
|
| |
Follow-Up to https://github.com/rails/rails/pull/14348
Ensure that SQLCounter.clear_log is called after each test.
This is a step to prevent side effects when running tests. This will allow us to run them in random order.
|
| |
|
|
|
|
|
|
|
|
| |
This makes the tests inside `migration_test.rb` order independent.
The assignments to `Reminder.table_name_prefix` and `Reminder.table_name_suffix`
previously leaked and had impact on following test cases.
This patch isolates the assignments on a throw-away subclass.
|
| |
|
|
|
|
|
| |
also override drop_table in AbstractMySQLAdapter to properly drop
temporary tables without committing the transaction
|
|
|
|
|
| |
We can now make use of the existent #travel/#travel_to helper methods
added to AS test case and available in all tests.
|
| |
|
| |
|
|
|
|
|
|
|
| |
We can conditional define the tests depending on the adapter or
connection.
Lets keep the skip for fail tests that need to be fixed.
|
|
|
| |
Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
name of the schema migrations table can be configured.
consolidated test_schema_migrations_table_name tests
Added changelog entry
edited changelog
removed commented lines
removed reader
ensure the schema migrations table is reset at end of test
added entry to configuration guide
guides typo and changelog order
|
|
|
|
| |
This prevents deprecation warnings from popping up.
|
|
|
|
|
|
|
|
|
|
|
| |
The options will specify the prefix and the suffix. Also, I'm moving the
method to be an instance method on the +Migration+ instance. This makes more
sense than being a class method on the +Migrator+ class because the only
place that uses it is on a +Migration+ instance (in a method_missing
hook). The logic for the Migrator shouldn't be doing any work to
calculate the table name, it should be the Migration itself.
Also made some small indentation fixes.
|
|
|
|
|
|
| |
This reverts commit 10259c3e906da2191ef0d43cd664a3b5504d9f8c.
reason: this causes rake test_mysql and test_mysql2 fail
|
|
|
|
|
|
| |
If the order in which tests are executed is changed then test fails.
This commit ensures that all migrations are run before ensuring that
there are no pending migration.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
During insertion of "# This migration comes from ... " comment at the beginning of
a migration, presence of magic comment was not considered.
|
|
|
|
| |
schema_statements uses the column name by default to construct the index name, and then raises an exception if it doesn't exist, even if the name option is specified, which causes #8858. this commit makes index_name_for_remove fall back to constructing the index name to remove based on the name option.
|
|
|
|
|
|
|
|
|
|
|
| |
Closes #9483.
There are SQL Queries that can't run inside a transaction. Since
the Migrator used to wrap all Migrations inside a transaction there
was no way to run these queries within a migration.
This patch adds `self.disable_ddl_transaction!` to the migration to
turn transactions off when necessary.
|
|
|
|
|
|
| |
The cleanup commit a85625d broke the test-case.
The schema was no longer modified so there was no
way to check that the rollback actually happened.
|
| |
|
|
|
|
| |
because some tests were not resetting them, and thus the tests were order dependent
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pending work on graceful app upgrades.
Revert "Merge pull request #8439 from joshsusser/fixes"
This reverts commit ce8ac39338f86388e70356b3a470b3ea443802ae, reversing
changes made to b0e7b6f67c984d4b1502e801781ed75fad681633.
Revert "Merge pull request #8431 from joshsusser/schemadump"
This reverts commit 036d3e1c2b65c4b8cbd23de2e20ad67b9b756182, reversing
changes made to 0c692f4d121792117b6a71e5ed590a31c3b9d12e.
Revert "Merge branch 'joshsusser-master' into merge"
This reverts commit 0c692f4d121792117b6a71e5ed590a31c3b9d12e, reversing
changes made to 2e299fca715b083a60222a85e48f9d3b8dd8ce93.
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
activerecord/test/cases/schema_dumper_test.rb
|
|
|
| |
why is this a Time to start with?
|
| |
|
|
|
|
|
| |
migrated_at: timestamp when migration run
fingerprint: md5 hash of migration source
name: filename without version or extension
|
| |
|
|\
| |
| | |
Coerce strings in create_join_table.
|
| |
| |
| |
| |
| |
| |
| | |
If you accidentally pass a string and a symbol, this breaks. So
we coerce them both to strings.
Fixes #7715
|
|/ |
|
| |
|
|\
| |
| | |
Notify A User they Have Pending Migrations
|
| |
| |
| | |
can be configured by setting config.active_record.migration. Setting to :page_load will raise an error on each page refresh if there are migrations that are pending. Setting to :page_load is defaulted in development for new applications.
|
| |
| |
| | |
if a rails project needs to be migrated ActiveRecord::Migrator.needs_migration? will be true or false if the current version matches the last version.
|
|/
|
|
|
|
|
|
|
| |
Several tests that passed when run in the order they are loaded
by rake test were failing when run in different sequences due to
problems with the implementation of assert_queries and
assert_no_queries as well as incorrect assumptions made about
how many queries might be executed by a database adapter in
various cases.
|
| |
|
| |
|
| |
|
| |
|
| |
|