aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema/postgresql_specific_schema.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Use a query that's compatible with PostgreSQL 9.2Matthew Draper2017-04-121-3/+5
| | | | | | Also, explicitly apply the order: generate_subscripts is unlikely to start returning values out of order, but we should still be clear about what we want.
* Fix rubocop violationsRafael Mendonça França2017-02-131-3/+3
|
* Schema dumping support for PostgreSQL oid typeRyuta Kamizono2017-02-121-10/+6
| | | | Closes #27980
* Schema dumping support for PostgreSQL interval typeRyuta Kamizono2017-02-121-11/+8
| | | | Closes #27979
* For `PostgreSQL >= 9.4` use `gen_random_uuid()`Yaw Boakye2016-11-221-0/+1
| | | | | | | | | | 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/testXavier Noria2016-08-061-15/+15
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* systematic revision of =~ usage in ARXavier Noria2016-07-231-1/+1
| | | | | Where appropriatei, prefer the more concise Regexp#match?, String#include?, String#start_with?, or String#end_with?
* Fix issue #23625Jon Moss2016-02-181-0/+5
| | | | | | This resolves a bug where if the primary key used is not `id` (ex: `uuid`), and has a `validates_uniqueness_of` in the model, a uniqueness error would be raised. This is a partial revert of commit `119b9181ece399c67213543fb5227b82688b536f`, which introduced this behavior.
* Add expression support on the schema defaultRyuta Kamizono2016-01-131-20/+17
| | | | | | | | Example: create_table :posts do |t| t.datetime :published_at, default: -> { 'NOW()' } end
* Correctly handle array columns with defaults in the schema dumperSean Griffin2015-06-111-0/+1
| | | | | | | | | If the subtype provides custom schema dumping behavior, we need to defer to it. We purposely choose not to handle any values other than an array (which technically should only ever be `nil`, but I'd rather code defensively here). Fixes #20515.
* Move PostgreSQL specific schema to postgresql_specific_schema.rbRyuta Kamizono2015-05-031-0/+11
|
* Delegate limit to subtypewallerjake2015-03-211-0/+4
| | | | | | | | | | As described here https://github.com/rails/rails/issues/19420. When using the Postgres BigInt[] field type the big int value was not being translated into schema.rb. This caused the field to become just a regular integer field when building off of schema.rb. This fix will address this by delegating the limit from the subtype to the Array type. https://github.com/rails/rails/issues/19420
* Remove unused tableRyuta Kamizono2015-02-251-10/+0
| | | | `postgresql_xml_data_type` table is used from nowhere.
* Prefer `drop_table if_exists: true` over raw SQLRyuta Kamizono2015-02-181-1/+1
| | | | | Lowercase raw SQL has been replaced by 07b659c already. This commit replaces everything else of raw SQL.
* pg tests, get rid of global schema `schema_1`.Yves Senn2014-12-021-7/+0
|
* pg tests, move uniqueness validation test to array tests.Yves Senn2014-12-021-10/+1
|
* tests, extract pg number tests into separate file.Yves Senn2014-12-021-9/+1
|
* tests, move schema shorthand assertions into pg specific tests.Yves Senn2014-12-021-55/+3
|
* tests, move pg geometric tests out of `base_test`.Yves Senn2014-12-021-13/+0
|
* tests, favor public API over inspecting columns where possible.Yves Senn2014-12-011-3/+0
| | | | | This is a follow up to https://github.com/rails/rails/commit/07786c5e75a7b0afdf318063510af6b475e3e04c and https://github.com/rails/rails/commit/cd2596f55e88fe659592612a793c4f4aa723c9be
* Added SchemaDumper support for tables with jsonb columns.Ted O'Meara2014-11-041-11/+4
|
* pg, preserve money type when dumping schema and extract money default.Yves Senn2014-06-031-8/+1
|
* test pg, move bit string type tests into `bit_string_test.rb`.Yves Senn2014-06-031-8/+0
|
* register OID for PostgreSQL citex datatype [Troy Kruthoff & Lachlan Sylvester]lsylvester2014-03-111-1/+10
| | | | citext makes it possible to use AR Hash finders for case-insensitive matching as sql UPPER/LOWER functions are not needed.
* extract PG range tests from datatype_test.rb into range_test.rbYves Senn2013-12-131-14/+1
|
* Correctly parse bigint defaults in PostgreSQLErik Peterson2013-04-051-0/+1
|
* Fix default output for postgres network address typesErik Peterson2013-02-261-3/+3
|
* Fix PostgreSQL tests on TravisAndrew White2013-01-241-1/+1
| | | | Travis only has PostgreSQL 9.1.x but 9.2 is required for range datatypes.
* Add postgresql range types supportbUg2013-01-231-12/+14
|
* Support for PostgreSQL's ltree data type.Rob Worley2013-01-041-1/+10
|
* AR supporting new intrange data type on PostgreSQL >= 9.2Alexey2012-12-161-1/+11
|
* Fix some indentation in the postgresql_specific_schemaRafael Mendonça França2012-11-281-9/+9
|
* Add comment to a table without model.Rafael Mendonça França2012-11-281-0/+1
| | | | | This table is being used to verify if the :limit options is being ignored for text and binary columns
* Postgresql doesn't accepts limits on text columns.Victor Costan2012-11-201-0/+5
|
* #7914 get default value when type uses schema nameArturo Pie2012-10-131-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | PostgreSQL adapter properly parses default values when using multiple schemas and domains. When using domains across schemas, PostgresSQL prefixes the type of the default value with the name of the schema where that type (or domain) is. For example, this query: ``` SELECT a.attname, d.adsrc FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = "defaults"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum; ``` could return something like "'<default_value>'::pg_catalog.text" or "(''<default_value>'::pg_catalog.text)::text" for the text columns with defaults. I modified the regexp used to parse this value so that it ignores anything between ':: and \b(?:character varying|bpchar|text), and it allows to have optional parens like in the above second example.
* postgres, map scaled intervals to string datatype (#7518)Yves Senn2012-09-061-1/+2
|
* ActiveRecord support to PostgreSQL 9.2 JSON typeDickson S. Guedes2012-09-051-1/+10
| | | | | | | | | This implements the support to encode/decode JSON data to/from database and creating columns of type JSON using a native type [1] supported by PostgreSQL from version 9.2. [1] http://www.postgresql.org/docs/9.2/static/datatype-json.html
* Add uuid type support to PostgreSQL adapterKonstantin Shabanov2012-06-141-1/+9
|
* Create plpgsql language if not availablePrem Sichanugrist2012-04-271-21/+29
| | | | | This should fix the problem in Travis CI server. (http://travis-ci.org/#!/rails/rails/jobs/1194988)
* add use_returning as a postgresql connection configDoug Cole2012-03-311-2/+27
|
* don't test schema where hstore not installedJoel2012-02-081-0/+2
|
* schema dumper tests for hstoreJoel2012-02-081-1/+8
|
* Added tsvector Datatype SupportBenjamin Fritsch2011-04-261-1/+9
| | | Applied Patch from https://rails.lighthouseapp.com/projects/8994/tickets/5577-suport-from-tsvector-data-type-in-postgresql
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* PostgreSQLAdapter: set time_zone to UTC when Base.default_timezone == :utc ↵Jack Christensen2010-01-251-1/+8
| | | | so that Postgres doesn't incorrectly offset-adjust values inserted into TIMESTAMP WITH TIME ZONE columns [#3777 state:resolved]
* PostgreSQL: XML datatype supportLeonardo Borges2009-08-091-2/+13
| | | | | | [#1874 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Ensure postgresql tests work when starting from scratch.Frederick Cheung2008-04-301-1/+1
|