aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb
Commit message (Collapse)AuthorAgeFilesLines
* Extract `integer_like_primary_key_type` to ease to handle it for adaptersRyuta Kamizono2017-09-251-6/+3
|
* Move integer-like primary key normalization to `new_column_definition`Ryuta Kamizono2017-09-231-7/+12
| | | | | | Currently the normalization only exists in `primary_key` shorthand. It should be moved to `new_column_definition` to also affect to `add_column` with primary key.
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Schema dumping support for PostgreSQL oid typeRyuta Kamizono2017-02-121-0/+4
| | | | Closes #27980
* Schema dumping support for PostgreSQL interval typeRyuta Kamizono2017-02-121-0/+4
| | | | Closes #27979
* Refactor `ColumnDefinition` to contain `options` hashRyuta Kamizono2017-02-091-16/+0
| | | | | | Column options are passed as an hash args then used as `options` hash in `add_column_options!`. Converting args to attributes is inconvinient for using options as an hash.
* Restore the behaviour of the compatibility layer for integer-like PKsRyuta Kamizono2017-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | The PR #27384 changed migration compatibility behaviour. ```ruby class CreateMasterData < ActiveRecord::Migration[5.0] def change create_table :master_data, id: :integer do |t| t.string :name end end end ``` Previously this migration created non-autoincremental primary key expected. But after the PR, the primary key changed to autoincremental, it is unexpected. This change restores the behaviour of the compatibility layer.
* Tweak bigint PK handlingMatthew Draper2017-01-181-0/+1
| | | | | | * Don't force PKs on tables that have explicitly opted out * All integer-like PKs are autoincrement unless they have an explicit default
* Make `:auto_increment` option works on `:bigint`Ryuta Kamizono2016-12-061-2/+6
| | | | Follow up to #27272.
* Make `:auto_increment` to internal primary key optionRyuta Kamizono2016-12-061-1/+6
| | | | | | Using `:auto_increment` option for abstracting the DB-specific auto incremental types. It is worth to ease to implement the compatibility layer.
* Followup of UUID default extension in the docs [ci skip]Prathamesh Sonpatki2016-11-241-5/+15
| | | | | | | - Mentioned clearly that for PostgreSQL < 9.4, you need to pass the default option with "uuid_generate_v4()" - Also updated PostgreSQL Active Record guide with this change. - https://github.com/rails/rails/pull/25395#r66877078
* For `PostgreSQL >= 9.4` use `gen_random_uuid()`Yaw Boakye2016-11-221-8/+9
| | | | | | | | | | Since 9.4, PostgreSQL recommends using `pgcrypto`'s `gen_random_uuid()` to generate version 4 UUIDs instead of the functions in the `uuid-ossp` extension. These changes uses the appropriate UUID function depending on the underlying PostgreSQL server's version, while maintaining `uuid_generate_v4()` in older migrations.
* applies new string literal convention in activerecord/libXavier Noria2016-08-061-1/+1
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Add missing data types for ActiveRecord migrationsMehmet Emin İNAÇ2015-06-081-0/+24
|
* The short-hand methods should be able to define multiple columnsRyuta Kamizono2015-02-231-44/+50
|
* Extract `primary_key` method into `ColumnMethods`Ryuta Kamizono2015-02-221-33/+33
|
* Add default options to 'bit' and 'bit_varying' methodsMelody2015-02-031-2/+2
|
* Adds default options hash for postgres money typeMelody Berton2015-02-031-1/+1
|
* Refactor `PostgreSQL::TableDefinition#primary_key`Ryuta Kamizono2014-12-271-4/+2
| | | | | Because call the `column` method and set the `options[:primary_key]` is handled at `super`, here need only treat the `options[:default]`.
* Move column option handling to new_column_definitionRyuta Kamizono2014-09-031-5/+3
| | | | | TableDefinition#column is not called from `add_column`. Use TableDefinition#new_column_definition for column option handling.
* Add support for Postgresql JSONBPhilippe Creux2014-07-241-0/+4
| | | | [Philippe Creux, Chris Teague]
* pg, preserve money type when dumping schema and extract money default.Yves Senn2014-06-031-0/+4
|
* Respect limit for PG bit stringsSean Griffin2014-06-031-19/+19
|
* pg, preserve type when schema dumping bit and bit varying columns.Yves Senn2014-06-031-0/+8
|
* pg, preserve point type when schema dumping.Yves Senn2014-06-031-0/+4
|
* pg, remove duplicated code.Yves Senn2014-05-241-4/+0
|
* pg, extract schema definitions into separate file.Yves Senn2014-05-241-0/+138
This mirrors the layout of abstract adapter and puts the definitions inside the `PostgreSQL` namespace (no longer under the adapter namespace). /cc @kares