aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* we don't need a HWIA and a hash allocated for just one k/v pairAaron Patterson2014-10-151-5/+3
|
* just look up the primary key from the columns hashAaron Patterson2014-10-151-6/+1
|
* add table.bigint supportAaron Patterson2014-10-151-1/+1
| | | | | | | | In the DSL you can now do: create_table(:foos) do |t| t.bigint :hi end
* Merge pull request #16781 from kamipo/move_column_option_handlingYves Senn2014-09-031-1/+0
|\ | | | | Move column option handling to new_column_definition
| * Move column option handling to new_column_definitionRyuta Kamizono2014-09-031-1/+0
| | | | | | | | | | TableDefinition#column is not called from `add_column`. Use TableDefinition#new_column_definition for column option handling.
* | Add and Remove string/strip requireArthur Neves2014-09-021-1/+0
|/ | | | | | | Method .strip_heredoc is defined in active_support/core_ext/string/strip.rb so we need to require it. [fixes #16677]
* Avoid using heredoc for user warningsGodfrey Chan2014-08-281-6/+5
| | | | | | | | | | Using heredoc would enforce line wrapping to whatever column width we decided to use in the code, making it difficult for the users to read on some consoles. This does make the source code read slightly worse and a bit more error-prone, but this seems like a fair price to pay since the primary purpose for these messages are for the users to read and the code will not stick around for too long.
* Add missing AS requireArthur Neves2014-08-191-0/+1
| | | | `strip_heredoc` method is defined on active_support/core_ext/string
* Change the default `null` value for timestampsSean Griffin2014-08-121-3/+21
| | | | | | | As per discussion, this changes the model generators to specify `null: false` for timestamp columns. A warning is now emitted if `timestamps` is called without a `null` option specified, so we can safely change the behavior when no option is specified in Rails 5.
* Merge pull request #16231 from Envek/type_in_referencesYves Senn2014-07-221-2/+16
|\ | | | | | | | | | | * 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 migrationsAndrey Novikov2014-07-221-1/+8
|/ | | | [Andrey Novikov & Łukasz Sarnacki]
* Always pass a column with a type object to quoteSean Griffin2014-06-281-1/+1
| | | | | | | | 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ça2014-06-261-1/+1
|
* fk: use random digest namesYves Senn2014-06-261-1/+10
| | | | | | 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: support for on_updateYves Senn2014-06-261-0/+4
|
* fk: rename `dependent` to `on_delete`Yves Senn2014-06-261-2/+2
|
* fk: support dependent option (:delete, :nullify and :restrict).Yves Senn2014-06-261-0/+4
|
* fk: generalize using `AlterTable` and `SchemaCreation`.Yves Senn2014-06-261-0/+12
|
* fk: `foreign_keys`, `add_foreign_key` and `remove_foreign_key` for MySQLYves Senn2014-06-261-0/+14
|
* Change wording of explanation about precision & scale of decimal numbers [ci ↵Prathamesh Sonpatki2014-06-041-2/+2
| | | | skip]
* Remove :timestamp column typeSean Griffin2014-05-191-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 typesMarc Schütz2014-05-181-6/+13
|
* Remove dead test code for unsupported adaptersSean Griffin2014-05-171-9/+0
|
* fix bug on non empty defaults for pg array columnsLuke Steensen2014-03-301-1/+1
| | | | fixes #10613
* support creating temporary tables from queriesCody Cutrer2013-12-141-2/+3
| | | | | also override drop_table in AbstractMySQLAdapter to properly drop temporary tables without committing the transaction
* Remove redundant `string_to_binary` from type-castingVipul A M2013-08-091-3/+0
|
* Merge pull request #10425 from ↵Rafael Mendonça França2013-06-131-0/+3
|\ | | | | | | | | ranjaykrishna/push_add_column_options_to_schema_creation Push add column options to schema creation
| * Moving add_column_options! up to SchemaCreationjeran2013-06-121-0/+3
| | | | | | | | | | | | | | | | removed two instances of add_column_options! from abstract_mysql_adapter reworked rename_column_sql to remove add_column_options from schema_statements changed to use new hash syntax.
* | Fixes #10432 add_column not creating array columns in PostgreSQLAdam Anderson2013-06-041-0/+1
| | | | | | | | | | | | When then PostgreSQL visitor was [added](https://github.com/rails/rails/commit/6b7fdf3bf3675a14eae74acc5241089308153a34) `add_column` was no longer receiving the column options directly. This caused the options to be lost along the way.
* | Merge pull request #10572 from nertzy/dont-modify-options-hash-in-primary-keyRafael Mendonça França2013-05-111-2/+1
| | | | | | | | Don't modify args in TableDefinition#primary_key
* | Make references with index:true pass Hash options to add_index.Victor Costan2013-04-011-1/+1
|/
* Add support for FULLTEXT and SPATIAL indexes using the :type flag for MySQL.Ken Mazaika2013-03-271-1/+1
|
* Custom index type support with :using.doabit2013-03-241-1/+1
|
* add uuid primary key supportAaron Patterson2013-03-221-2/+3
|
* separate primary key from column typeAaron Patterson2013-03-221-10/+11
|
* push the mysql add_column up to the abstract adapterAaron Patterson2013-03-221-1/+3
|
* allow multiple add columnsAaron Patterson2013-03-221-4/+4
|
* push alter table add column sql in to the schema modification visitorAaron Patterson2013-03-221-6/+23
|
* there is no reason to check for an already defined columnAaron Patterson2013-03-221-1/+1
|
* push column initialization down to the factory methodAaron Patterson2013-03-221-13/+13
|
* @columns list is no longer necessaryAaron Patterson2013-03-221-8/+4
|
* keep ivars private, do not manipulate them outside their owner objectAaron Patterson2013-03-221-0/+4
|
* factory methods should not alter object stateAaron Patterson2013-03-221-5/+7
|
* push SQL generation inside the schema creation objectAaron Patterson2013-03-221-1/+5
|
* mostly decouple TableDefinition from the database connectionAaron Patterson2013-03-221-3/+3
|
* remove to_sql from TableDefinitionAaron Patterson2013-03-221-8/+0
|
* decouple column definition from the database connectionAaron Patterson2013-03-221-6/+6
|
* remove knowledge of SQL from the column definition objectAaron Patterson2013-03-221-21/+2
|
* Refactored to reuse methodAnupam Choudhury2013-03-151-2/+2
|
* ask column if it is a pkAaron Patterson2013-03-141-1/+5
|