| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
because of Oracle database index length spec.
|
| |
|
|
|
|
|
|
|
|
| |
I renamed the test to better communicate it's intention. Since it also tests:
- add_column
- remove_column
- change_column
There is no reason to call it rename_column_test.
|
| |
|
| |
|
|
|
|
| |
When a table or a column is renamed related indexes kept their name. This will lead to confusing names. This patch renames related indexes when a column or a table is renamed. Only indexes with names generated by rails will be renamed. Indexes with custom names will not be renamed.
|
|
|
|
|
|
|
|
|
|
|
| |
Some adapter (SQLite3) need to perform renaming operations to support
the rails DDL. These rename prefixes operate with prefixes. When an
index name already uses up the full space provieded by
`index_name_length` these internal operations will fail. This patch
introduces `allowed_index_name_length` which respects the amount of
characters used for internal operations. It will always be <=
`index_name_length` and every adapter can define how many characters
need to be reserved.
|
|
|
|
| |
Cleanup change_schema tests to remove extra sorts on columns.
|
| |
|
|
|
|
|
|
|
| |
database
Not only PostgreSQL, Oracle database adapter drops the multi-column index
if any of the indexed columns dropped by remove_column.
|
| |
|
|
|
|
|
| |
minitest/autorun load minitest/spec polluting the global namespace with
the DSL that we don't want on Rails
|
|
|
|
|
|
| |
There were a couple of tests, which had FIXME comments in palce of
assertions. I replaced these FIXME comments with actual assertions to
get more feedback from our test suite.
|
| |
|
|
|
|
| |
[#8267]
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
reversible.
[#8267]
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
migrated_at: timestamp when migration run
fingerprint: md5 hash of migration source
name: filename without version or extension
|
| |
|
| |
|
| |
|
|
|
|
| |
message
|
|
|
|
|
|
|
| |
This was there due historical reasons since
7dc45818dc43c163700efc9896a0f3feafa31138 to give the user the
possibility to create unique indexes passing "UNIQUE" as the third
argument
|
|
|
|
| |
Closes #8104
|
| |
|
| |
|
|
|
|
| |
Fixes #7374
|
|
|
|
|
| |
On reflection, it seems like a bit of a weird method to have on
ActiveRecord::Base, and it shouldn't be needed most of the time anyway.
|
|
|
|
|
|
|
|
|
|
|
| |
Previously it returned an Array.
If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This
is more explicit.
In most cases this should not break existing code, since
Relations use method_missing to delegate unknown methods to #to_a
anyway.
|
|
|
|
|
|
|
| |
Commit 3dbedd2 added NOT NULL constraints to timestamps.
Commit fcef728 started to revert this, but was incomplete.
With this commit, 3dbedd2 should be fully reverted and
timestamps will no longer default to NOT NULL.
|
|\
| |
| | |
Add indexes to create_join_table method
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For instance, running
rails g migration CreateMediaJoinTable artists musics:uniq
will create a migration with
create_join_table :artists, :musics do |t|
# t.index [:artist_id, :music_id]
t.index [:music_id, :artist_id], unique: true
end
|
| |
| |
| |
| |
| |
| |
| | |
Dry up reseting the renamed table after each test.
Also made use of the AR::Base.connection object already
available from AR::MigrationTest#connection.
|
|\ \
| |/
|/| |
Rename default sequence when table is renamed? [AR:postgres]
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Examples:
add_reference :products, :supplier, polymorphic: true, index: true
remove_reference :products, :user
`add_belongs_to` and `remove_belongs_to` are
acceptable.
|
| |
| |
| |
| | |
connection.tables returns an array of strings
|
|\ \
| | |
| | | |
Refactor migration test_helper
|