Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Cleanup Transaction inheritance. | Arthur Neves | 2014-08-05 | 1 | -70/+54 |
| | | | | | | | | | Transaction class doesnt need to encapsulate the transaction state using inheritance. This removes all Transaction subclasses, and let the Transaction object controls different actions based on its own state. Basically the only actions would behave differently are `being`,`commit`,`rollback` as they could act in a savepoint or in a real transaction. | ||||
* | Replace ClosedTransaction with NullTransaction | Arthur Neves | 2014-07-31 | 1 | -7/+4 |
| | |||||
* | Move TransactionManager to bottom of class | Arthur Neves | 2014-07-31 | 1 | -67/+67 |
| | |||||
* | Merge pull request #16341 from arthurnn/transactions_remove_begin | Rafael Mendonça França | 2014-07-31 | 1 | -54/+18 |
|\ | | | | | Transactions refactoring - 2 | ||||
| * | Make ClosedTransaction a null object | Arthur Neves | 2014-07-31 | 1 | -16/+6 |
| | | |||||
| * | Remove parent on Transaction object | Arthur Neves | 2014-07-31 | 1 | -16/+9 |
| | | |||||
| * | Remove being/number methods from transaction class | Arthur Neves | 2014-07-31 | 1 | -27/+8 |
| | | |||||
* | | Clarify how the ConnectionHandler works | Jack Danger Canty | 2014-07-31 | 1 | -15/+36 |
|/ | | | | | | | This makes the implicit description of how connection pooling works a little more explicit. It converts the examples of a model hierarchy into actual Ruby code and demonstrates how the key structure of the database.yml relates to the `establish_connection` method. | ||||
* | Remove @state.parent assignment on commit | Arthur Neves | 2014-07-29 | 1 | -2/+1 |
| | | | | | | | | | This piece of code was introduced on 67d8bb963d5d51fc644d6b1ca20164efb4cee6d7 , which was calling `committed?` in the `transaction_state` before calling the `committed!` method. However on 7386ffc781fca07a0c656db49fdb54678caef809, the `committed?` check was removed and replaced by a `finalized?`, which only checks if the state is not nil. Thus we can remove that line. | ||||
* | Extract the transaction class to a local variable | Rafael Mendonça França | 2014-07-28 | 1 | -6/+2 |
| | |||||
* | savepoint_name should return nil for non-savepoint transactions | Arthur Neves | 2014-07-28 | 1 | -1/+6 |
| | | | | Also add test to assets the savepoint name | ||||
* | Transactions refactoring | Arthur Neves | 2014-07-28 | 2 | -38/+64 |
| | | | | | | | Add a transaction manager per connection, so it can controls the connection responsibilities. Delegate transaction methods to transaction_manager | ||||
* | Remove finishing? method from transaction. | Arthur Neves | 2014-07-24 | 1 | -23/+10 |
| | | | | | | | | | | The finishing variable on the transaction object was a work-around for the savepoint name, so after a rollback/commit the savepoint could be released with the previous name. related: 9296e6939bcc786149a07dac334267c4035b623a 60c88e64e26682a954f7c8cd6669d409ffffcc8b | ||||
* | Merge pull request #16231 from Envek/type_in_references | Yves Senn | 2014-07-22 | 2 | -4/+25 |
|\ | | | | | | | | | | | * Allow to specify a type for foreign key column in migrations * unified the docs * some cleanup in CHANGELOG | ||||
| * | Allow to specify a type for foreign key column in migrations | Andrey Novikov | 2014-07-22 | 2 | -2/+10 |
|/ | | | | [Andrey Novikov & Łukasz Sarnacki] | ||||
* | Change back occurrences of SQLite(3) to sqlite3 when referring to the | Zachary Scott | 2014-07-06 | 1 | -1/+1 |
| | | | | adapter, fixed from #16057 [ci skip] | ||||
* | [ci skip] /sqlite/i --> SQLite | Akshay Vishnoi | 2014-07-06 | 1 | -1/+1 |
| | |||||
* | Always pass a column with a type object to quote | Sean Griffin | 2014-06-28 | 3 | -13/+8 |
| | | | | | | | | The only case where we got a column that was not `nil`, but did not respond to `cast_type` was when type casting the default value during schema creation. We can look up the cast type, and add that object to the column definition. Will allow us to consistently rely on the type objects for type casting in all directions. | ||||
* | Add nodoc to internal class [ci skip] | Rafael Mendonça França | 2014-06-26 | 1 | -1/+1 |
| | |||||
* | fk: add docs | Yves Senn | 2014-06-26 | 1 | -0/+58 |
| | |||||
* | fk: review corrections: indent, visibility, syntax, wording. | Yves Senn | 2014-06-26 | 2 | -26/+27 |
| | |||||
* | fk: use random digest names | Yves Senn | 2014-06-26 | 3 | -10/+23 |
| | | | | | | The name of the foreign key is not relevant from a users perspective. Using random names resolves the urge to rename the foreign key when the respective table or column is renamed. | ||||
* | fk: raise for invalid :on_update / :on_delete values | Yves Senn | 2014-06-26 | 1 | -3/+8 |
| | |||||
* | fk: `add/remove_foreign_key` are noop for adapters that don't support fk | Yves Senn | 2014-06-26 | 1 | -0/+4 |
| | |||||
* | fk: raise when identifiers are longer than `allowed_index_name_length`. | Yves Senn | 2014-06-26 | 1 | -1/+5 |
| | |||||
* | fk: support for on_update | Yves Senn | 2014-06-26 | 3 | -3/+9 |
| | |||||
* | fk: rename `dependent` to `on_delete` | Yves Senn | 2014-06-26 | 3 | -9/+8 |
| | |||||
* | fk: infere column name from table names. | Yves Senn | 2014-06-26 | 1 | -4/+14 |
| | | | | This allows to create and remove foreign keys without specifying a column. | ||||
* | fk: support dependent option (:delete, :nullify and :restrict). | Yves Senn | 2014-06-26 | 3 | -2/+18 |
| | |||||
* | fk: `:primary_key` option for non-standard pk's. | Yves Senn | 2014-06-26 | 1 | -1/+3 |
| | |||||
* | fk: generalize using `AlterTable` and `SchemaCreation`. | Yves Senn | 2014-06-26 | 3 | -7/+56 |
| | |||||
* | fk: `foreign_keys`, `add_foreign_key` and `remove_foreign_key` for MySQL | Yves Senn | 2014-06-26 | 2 | -0/+21 |
| | |||||
* | Remove unused param 'conn' from ConnectionPool#release | Mindaugas Mozūras | 2014-06-23 | 1 | -3/+3 |
| | |||||
* | Don't use column object for type casting in `quoting` | Sean Griffin | 2014-06-18 | 1 | -4/+4 |
| | | | | | | | | | We're never going to be able to use the attribute object here, however, so let's just accept the ugly demeter violation here for now. Remove test cases which were either redundant with other tests in the file, or were actually testing the type objects (which are tested elsewhere) | ||||
* | Don't type cast the default on the column | Sean Griffin | 2014-06-17 | 1 | -1/+11 |
| | | | | | | | 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. | ||||
* | /mysql/i -> MySQL, Spell correct in continuation to #15555 | Akshay Vishnoi | 2014-06-14 | 2 | -4/+4 |
| | |||||
* | Remove unused require | Sean Griffin | 2014-06-11 | 1 | -2/+0 |
| | | | | We're not longer using `ipaddr` in schema dumper | ||||
* | Change wording of explanation about precision & scale of decimal numbers [ci ↵ | Prathamesh Sonpatki | 2014-06-04 | 1 | -2/+2 |
| | | | | skip] | ||||
* | Refactor quoting of binary data to not be based on the column type | Sean Griffin | 2014-06-03 | 1 | -29/+38 |
| | |||||
* | refactor, introduce `Type#type_cast_for_schema` to cast for schema.rb | Yves Senn | 2014-05-30 | 1 | -26/+1 |
| | | | | | | | This removes the case statement in `SchemaDumper` and gives every `Type` the possibility to control the SchemaDumper default value output. /cc @sgrif | ||||
* | Keep closer to other methods that touch @transaction | Arthur Neves | 2014-05-28 | 1 | -0/+4 |
| | |||||
* | Extract types which don't require additional typecasting to a method | Sean Griffin | 2014-05-26 | 1 | -4/+9 |
| | | | | | Database specific adapters shouldn't need to override `type_cast` to define types which are already in an acceptable state. | ||||
* | Refactor the type casting of booleans in MySQL | Sean Griffin | 2014-05-26 | 1 | -2/+10 |
| | |||||
* | Remove checks against `column.type` in abstract adapter quoting | Sean Griffin | 2014-05-26 | 1 | -34/+17 |
| | | | | | | The intention is to eventually remove `column` from the arguments list both for `quote` and for `type_cast` entirely. This is the first step to that end. | ||||
* | Add an interface for type objects to control Ruby => SQL | Sean Griffin | 2014-05-26 | 1 | -0/+9 |
| | | | | | Adds the ability to save custom types, which type cast to non-primitive ruby objects. | ||||
* | Remove special case in schema dumper for decimal without scale | Sean Griffin | 2014-05-23 | 1 | -9/+2 |
| | |||||
* | Remove :timestamp column type | Sean Griffin | 2014-05-19 | 1 | -0/+7 |
| | | | | | | | | | | | | The `:timestamp` type for columns is unused. All database adapters treat them as the same database type. All code in `ActiveRecord` which changes its behavior based on the column's type acts the same in both cases. However, when the type is passed to code that checks for the `:datetime` type, but not `:timestamp` (such as XML serialization), the result is unexpected behavior. Existing schema definitions will continue to work, and the `timestamp` type is transparently aliased to `datetime`. | ||||
* | Make `:index` in migrations work with all column types | Marc Schütz | 2014-05-18 | 1 | -6/+13 |
| | |||||
* | Remove dead test code for unsupported adapters | Sean Griffin | 2014-05-17 | 1 | -9/+0 |
| | |||||
* | Convert column name to string only once | Kuldeep Aggarwal | 2014-05-04 | 1 | -1/+2 |
| |