| 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes you want to create a table without an associated model and
test, which is also not a join table. With this commit, you can now
do that.
Example:
rails g migration create_posts title:string
or
rails g migration CreatePosts title:string
This commit also moves the template the model generator uses for the
migration to the migration templates folder, as it seems a more
sensible place for it now that it is shared code.
|
|
|
|
|
| |
Explain that it doesn't create indices by default and
that it also has a block form.
|
| |
|
| |
|
|\ |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
| |
We should mention that the ordering matters with regards
to timestamps, and not imply that it's just for uniqueness
purposes.
Closes #8610.
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
guides/source/migrations.md
|
| | |
|
|/
|
|
|
|
|
|
|
| |
This introduces a bunch of editing/re-writing to the migrations guide.
There were a bunch of small changes, and a few larger ones:
* mysql does support transactions.
* Add a section about db/seeds.rb
* Largely re-wrote the first few sections
|
|
|
|
|
| |
We have three or four different introduction sentences to the guides.
After this commit, we use the same one everywhere.
|
|
|
|
|
| |
Other guides that talk about Active Record specific features include the
name of the library in the title, this one should too for consistency.
|
|
|
|
| |
Talked with @fxn about this. Bullet points should have periods at the ends.
|
|
|
|
| |
The wording of these was a bit off, so I fixed them.
|
|
|
|
|
|
|
| |
Most of the guides have a few simple sentences describing what they will show
you at the top. This one had a few big paragraphs. I've moved those paragraphs
down to an introductory one, and written a new smaller one for the introduction.
This makes this guide more consistent with the others.
|
| |
|
|
|
|
| |
back a migration and couldn't understand why 'rake db:reset' didn't work.
|
|\
| |
| |
| |
| |
| | |
Conflicts:
activesupport/lib/active_support/core_ext/hash/slice.rb
guides/source/active_support_core_extensions.md
|
| |
| |
| |
| |
| |
| | |
This reverts commit f5b9ed4fbc3215a5fce48985ea372ad3f1182252.
REASON: Translation work can not be done in the docrails repository
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
This is an attempt to address issue #6939, where an earlier migration
added a column to the database, and a later migration uses a model and
references that column.
When both migrations were run together with `rake db:migrate` the column
information in memory still referenced the old table structure.
Running the migrations separately fixed this, as a new connection was
then established before referencing the model. Explicitly calling
`reset_column_information` is a more reliable workaround.
|
|\
| |
| |
| |
| |
| | |
Conflicts:
activerecord/lib/active_record/persistence.rb
railties/lib/rails/generators/rails/resource_route/resource_route_generator.rb
|
| | |
|
| |
| |
| |
| | |
The feature is available after Rails 3.1 and this is no longer a "new" feature.
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|