aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* pg, `default_sequence_name` respects schema. Closes #7516.Yves Senn2014-05-301-2/+2
|
* Merge pull request #11896 from nkondratyev/fix_pg_columns_for_distinctYves Senn2014-05-301-1/+1
|\ | | | | | | | | | | | | Fixed #columns_for_distinct of postgresql adapter Conflicts: activerecord/CHANGELOG.md
| * Fixed `columns_for_distinct` of postgresql adapterNikolay Kondratyev2013-08-151-1/+1
| |
* | pg, `reset_pk_sequence!` respects schemas. Closes #14719.Yves Senn2014-05-301-5/+13
| |
* | pg, `PostgreSQL::Name` to hold schema qualified names.Yves Senn2014-05-301-4/+4
| |
* | Ensure we always use instances of the adapter specific column classSean Griffin2014-05-281-1/+5
| | | | | | | | | | | | - Create a consistent API across adapters for building new columns - Use it for custom properties so we don't get `UndefinedMethodError`s in stuff I'm implementing elsewhere.
* | remove unwanted `to_sym` call.Kuldeep Aggarwal2014-05-261-1/+1
| |
* | Move parsing of PG sql strings for defaults out of columnSean Griffin2014-05-231-1/+3
| |
* | Allow additional arguments to be used during type map lookupsSean Griffin2014-05-221-1/+1
| | | | | | | | | | | | | | | | Determining things like precision and scale in postgresql will require the given blocks to take additional arguments besides the OID. - Adds the ability to handle additional arguments to `TypeMap` - Passes the column type to blocks when looking up PG types
* | pg, re-introduce `PostgreSQL::Utils` to unify schema/table extraction.Yves Senn2014-05-191-18/+1
| | | | | | | | Partial revert of c0bfc3f412834ffe8327a15ae3a46602cc28e425
* | :scissors:Rafael Mendonça França2014-05-141-1/+0
| |
* | PostgreSQLAdapter::Utils seems to be only used from a single spot - quite ↵kares2014-05-141-1/+19
| | | | | | | | redundant
* | PostgreSQL's SchemaStatements seems a could candidate for re-use (with AR-JDBC)kares2014-05-141-6/+2
| |
* | pg, `change_column_default` accepts `[]`. Closes #11586.Yves Senn2014-05-121-0/+1
| |
* | Handle other pk types in PostgreSQL gracefully.Patrick Robertson2014-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In #10410 it was noted that you can no longer create PK's with the type of bigserial in PostgreSQL in 4.0.0.rc1. This is mostly because the newer adapter is checking for column type with the id column instead of just letting it pass through like it did before. Side effects: You may just create a PK column of a type that you really don't want to be your PK. As far as I can tell this was allowed in 3.2.X and perhaps an exception should be raised if you try and do something extremely dumb.
* | refactor, move `column_for` to `AbstractAdapter` for better reuse.Yves Senn2014-05-041-4/+0
| |
* | Changed change_column in PG schema_statements.rb to make sure that the ↵Eric Chahin2014-04-151-2/+8
| | | | | | | | uuid_generate function was not being quoted.
* | PostgreSQL, adapter automatically reloads it's type map. Closes #14678.Yves Senn2014-04-111-3/+1
| | | | | | | | [Yves Senn & Matthew Draper]
* | PostgreSQL, Support for materialized views. [Dave Lee & Yves Senn]Dave Lee2014-04-021-4/+1
| | | | | | | | | | Expand the query used in #table_exists? to include materialized views in the kinds of relations it searches.
* | Postgres schema: Constrain sequence search classidJosh Williams2014-03-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | The pk_an_sequence_for query previously joined against pg_class's oid for rows in pg_depend, but pg_depend's objid may point to other system tables, such as pg_attrdef. If a row in one of those other tables coincidentally has the same oid as an (unrelated) sequence, that sequence name may be returned instead of the real one. This ensures that only the pg_depend entries pointing to pg_class are considered.
* | psql implementation of #index_name_exists?Jonathan Baudanza2014-01-161-0/+13
| |
* | make the type_map per connection. fixes #13182Aaron Patterson2013-12-041-1/+1
| |
* | Merge pull request #10664 from aderyabin/docpatchYves Senn2013-10-291-1/+1
|\ \ | |/ |/| Fix doc in Postgres database creation [ci skip]
| * Fix doc in Postgres database creationAndrey Deryabin2013-06-251-1/+1
| |
* | `change_column` for PG adapter respects `:array` option.Yves Senn2013-07-161-2/+3
|/
* Reject blank order_values within #columns_for_distinct, as the orders aren't ↵Ben Woosley2013-05-101-1/+1
| | | | used at all on non-postgres adapters.
* Fix that #exists? can produce invalid SQL: "SELECT DISTINCT DISTINCT"Ben Woosley2013-05-101-7/+2
| | | | | | | | | | | | The combination of a :uniq => true association and the #distinct call in #construct_limited_ids_condition combine to create invalid SQL, because we're explicitly selecting DISTINCT, and also sending #distinct on to AREL, via the relation#distinct_value. Rather than build a select distinct clause in #construct_limited_ids_condition, I set #distinct! and pass just the columns into the select statement. This requires introducing a #columns_for_distinct method to return the select columns but not the statement itself.
* Make SchemaDumper emit "id: :uuid" when appropriate. Fixes #10451.Brian Buchanan2013-05-031-1/+2
|
* Do not calculate values if they are not going to be usedCarlos Antonio da Silva2013-03-301-7/+9
| | | | | | | | | When building the indexes list in PostgreSQL, IndexDefinition objects are only created if the query for the related attributes really returns something matching the attributes. In case it does not, the variables for building the definition objects were being created but not used.
* Add support for FULLTEXT and SPATIAL indexes using the :type flag for MySQL.Ken Mazaika2013-03-271-2/+2
|
* Adds support for concurrent indexing in PostgreSQL adapterDan McClain2013-03-251-6/+2
| | | | | | | | Adds support for algorithm option in MySQL indexes Moves USING and algorithm options upstream The syntax is still specific to the Adapter, so the actual executed string happens in the corresponding adapter
* Custom index type support with :using.doabit2013-03-241-1/+11
|
* add uuid primary key supportAaron Patterson2013-03-221-0/+9
|
* push the mysql add_column up to the abstract adapterAaron Patterson2013-03-221-10/+4
|
* allow multiple add columnsAaron Patterson2013-03-221-1/+1
|
* pull add_column_options! off the pg connection classAaron Patterson2013-03-221-0/+13
|
* add a pg visitor for dealing with schema modificationAaron Patterson2013-03-221-4/+21
|
* also rename indexes when a table or column is renamedYves Senn2013-02-201-3/+6
| | | | When a table or a column is renamed related indexes kept their name. This will lead to confusing names. This patch renames related indexes when a column or a table is renamed. Only indexes with names generated by rails will be renamed. Indexes with custom names will not be renamed.
* Add postgresql range types supportbUg2013-01-231-8/+0
|
* Don't rely on Hash key's orderingVitor Baptista2013-01-161-2/+2
| | | | | | | | | | | | | | | | | | | If we set encoding latin1 for a PostgreSQL database, it calls PostgreSQLAdapter::create_database with options that have, among other things: { 'encoding' => 'latin1' } Then, we use reverse_merge(:encoding => "utf8") to setup the default encoding. In the end, the hash looks like: { :encoding => 'utf8', 'encoding' => 'latin1' } The call to options.symbolize_keys calls to_sym on each_key of this Hash. It usually means that the encoding passed overwrites the default utf8, but it's not guaranteed. So, we shouldn't rely on it. The same was happening in ActiveRecord::ConnectionHandling.
* AR supporting new intrange data type on PostgreSQL >= 9.2Alexey2012-12-161-0/+8
|
* Fix #8414. Performance problem with postgresql adapter primary_key function.kennyj2012-12-051-3/+2
|
* pg_namespace table isn't used.kennyj2012-12-051-1/+0
|
* Refactoring, testing and documenting pg_connection.distinctSemyon Perepelitsa2012-11-211-13/+10
|
* Postgresql doesn't accepts limits on text columns.Victor Costan2012-11-201-0/+7
|
* Migration of docs to 1.9 hash syntaxAvnerCohen2012-10-231-1/+1
|
* #7914 Remove code for unsupported postgreSQL version.Arturo Pie2012-10-131-3/+0
| | | | | | | Remove parsing of character type default values for 8.1 formatting since Rails doesn't support postgreSQL 8.1 anymore. Remove misleading comment unrelated to code.
* #7914 Using a better way to get the defaults from db.Arturo Pie2012-10-131-5/+5
| | | | | | | | | According to postgreSQL documentation: (http://www.postgresql.org/docs/8.2/static/catalog-pg-attrdef.html) we should not be using 'adsrc' field because this field is unaware of outside changes that could affect the way that default values are represented. Thus, I changed the queries to use "pg_get_expr(adbin, adrelid)" instead of the historical "adsrc" field.
* PostgreSQL, quote table names when fetching the primary key. Closes #5920Yves Senn2012-10-051-1/+1
|
* Query for sequence info also should be markd as SCHEMA.kennyj2012-09-151-3/+3
|