Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Extract the index length validation to a auxiliar method | Rafael Mendonça França | 2014-12-30 | 1 | -3/+2 |
| | |||||
* | Ensures that primary_key method will return nil when multi-pk | Arthur Neves | 2014-12-30 | 1 | -4/+4 |
| | | | | | | | When table has a composite primary key, the `primary_key` method for sqlite3 and postgresql was only returning the first field of the key. Ensures that it will return nil instead, as AR dont support composite pks. | ||||
* | Support for any type primary key. | Ryuta Kamizono | 2014-12-28 | 1 | -9/+0 |
| | |||||
* | `force: :cascade` to recreate tables referenced by foreign-keys. | Yves Senn | 2014-12-19 | 1 | -0/+4 |
| | |||||
* | Merge pull request #17799 from kamipo/refactor_add_column_options | Rafael Mendonça França | 2014-11-28 | 1 | -4/+12 |
|\ | | | | | Refactor `add_column_options!`, to move the quoting of default value for :uuid in `quote_value`. | ||||
| * | Rename to `quote_default_expression` from `quote_value` | Ryuta Kamizono | 2014-11-28 | 1 | -1/+1 |
| | | |||||
| * | Refactor `add_column_options!`, to move the quoting of default value for ↵ | Ryuta Kamizono | 2014-11-28 | 1 | -4/+12 |
| | | | | | | | | :uuid in `quote_value`. | ||||
* | | Refactor `SchemaCreation#visit_AddColumn` | Ryuta Kamizono | 2014-11-27 | 1 | -6/+0 |
|/ | |||||
* | allow types to be passed in for USING casts | Aaron Patterson | 2014-11-24 | 1 | -0/+3 |
| | | | | | | | This allows us so abstract the migration from the type that is actually used by Rails. For example, ":string" may be a varchar or something, but the framework does that translation, and the app shouldn't need to know. | ||||
* | allow the "USING" statement to be specified on change column calls | Aaron Patterson | 2014-11-24 | 1 | -1/+3 |
| | |||||
* | Rename the primary key index when renaming a table in pg | Sean Griffin | 2014-11-22 | 1 | -0/+3 |
| | | | | | | | | Also checked to make sure this does not affect foreign key constraints. (It doesn't). Fixes #12856 Closes #14088 | ||||
* | raise a better exception for renaming long indexes | Aaron Patterson | 2014-11-20 | 1 | -0/+3 |
| | |||||
* | remove unused and untested API | Aaron Patterson | 2014-10-31 | 1 | -6/+2 |
| | |||||
* | fix set_pk_sequence and add a test for it. | Aaron Patterson | 2014-10-31 | 1 | -1/+1 |
| | |||||
* | Added region sequencing of primary keys for Postgres. | Joe Rafaniello | 2014-10-31 | 1 | -0/+21 |
| | | | | | | | Skip setting sequence on a table create if the value is 0 since it will start the first value at 1 anyway. This fixes the PG error 'setval: value 0 is out of bounds for sequence vms_id_seq...' encountered when migrating a new DB. BugzID: 15452,9772,13475,16850 | ||||
* | Use #inject over #sum to build PG create DB statement | Geoff Harcourt | 2014-09-17 | 1 | -2/+2 |
| | | | | | | | | | | | | While investigating #16951 I found that another library's monkey-patching of `Enumerable` was causing the test migrations helper to break when trying to build the `CREATE DATABASE` statement. The prior approach used `#sum` to build the string from the options hash. As the code that combines the options to build the database statement is not user-facing, using `#inject` here instead will remove the only place where the database creation/migration code is dependent on ActiveSupport's monkey-patching of `Enumerable`. | ||||
* | pg, correctly dump foreign keys targeting tables in a different schema. | Yves Senn | 2014-09-17 | 1 | -1/+2 |
| | | | | | | Closes #16907. [Matthew Draper & Yves Senn] | ||||
* | pg, `default_sequence_name` needs to return a string. | Yves Senn | 2014-08-25 | 1 | -2/+2 |
| | | | | | | | | | This is a reacon to https://github.com/rails/rails/commit/d6c1205584b1ba597db4071b168681678b1e9875#commitcomment-7502487 This backwards incompatibility was introduced with d6c12055 to fix #7516. However both `connection.default_sequence_name` and `model.sequence_name` are public API. The PostgreSQL adapter should honor the interface and return strings. /cc @matthewd @chancancode | ||||
* | CHANGELOG & improvements to #16649 | Godfrey Chan | 2014-08-23 | 1 | -2/+2 |
| | | | | | * Require either FIRST or LAST qualifier for "NULLS ..." * Require whitespace before "NULLS ..." | ||||
* | Don't trim excess whitespace in pg #columns_for_distinct | Agis- | 2014-08-24 | 1 | -1/+2 |
| | | | | Fixes #16623 introduced by https://github.com/rails/rails/commit/3d5a2019bcccc6fb01bee4811ca669f4383edb51 | ||||
* | pg, `change_column_default, :table, :column, nil` issues `DROP DEFAULT`. | Yves Senn | 2014-07-24 | 1 | -1/+9 |
| | | | | | | | | | | | | Closes #16261. [Matthew Draper, Yves Senn] Using `DEFAULT NULL` results in the same behavior as `DROP DEFAULT`. However, PostgreSQL will cast the default to the columns type, which leaves us with a default like "default NULL::character varying". /cc @matthewd | ||||
* | Always pass a column with a type object to quote | Sean Griffin | 2014-06-28 | 1 | -0/+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. | ||||
* | rename sequence only if it exists | Abdelkader Boudih | 2014-06-27 | 1 | -3/+3 |
| | |||||
* | fk: review corrections: indent, visibility, syntax, wording. | Yves Senn | 2014-06-26 | 1 | -12/+12 |
| | |||||
* | fk: support for on_update | Yves Senn | 2014-06-26 | 1 | -7/+12 |
| | |||||
* | fk: rename `dependent` to `on_delete` | Yves Senn | 2014-06-26 | 1 | -2/+2 |
| | |||||
* | fk: support dependent option (:delete, :nullify and :restrict). | Yves Senn | 2014-06-26 | 1 | -1/+8 |
| | |||||
* | fk: generalize using `AlterTable` and `SchemaCreation`. | Yves Senn | 2014-06-26 | 1 | -20/+0 |
| | |||||
* | fk: `foreign_keys`, `add_foreign_key` and `remove_foreign_key` for MySQL | Yves Senn | 2014-06-26 | 1 | -7/+0 |
| | |||||
* | fk: add `foreign_keys` for PostgreSQL adapter. | Yves Senn | 2014-06-26 | 1 | -0/+24 |
| | |||||
* | fk: `add_foreign_key` and `remove_foreign_key` for PostgreSQL adapter. | Yves Senn | 2014-06-26 | 1 | -0/+27 |
| | |||||
* | pg, support default values for enum types. Closes #7814. | Yves Senn | 2014-05-30 | 1 | -1/+1 |
| | | | | | This is an intermediate solution. It is related to the refactoring @sgrif is making and will change in the future. | ||||
* | pg, `default_sequence_name` respects schema. Closes #7516. | Yves Senn | 2014-05-30 | 1 | -2/+2 |
| | |||||
* | Merge pull request #11896 from nkondratyev/fix_pg_columns_for_distinct | Yves Senn | 2014-05-30 | 1 | -1/+1 |
|\ | | | | | | | | | | | | | Fixed #columns_for_distinct of postgresql adapter Conflicts: activerecord/CHANGELOG.md | ||||
| * | Fixed `columns_for_distinct` of postgresql adapter | Nikolay Kondratyev | 2013-08-15 | 1 | -1/+1 |
| | | |||||
* | | pg, `reset_pk_sequence!` respects schemas. Closes #14719. | Yves Senn | 2014-05-30 | 1 | -5/+13 |
| | | |||||
* | | pg, `PostgreSQL::Name` to hold schema qualified names. | Yves Senn | 2014-05-30 | 1 | -4/+4 |
| | | |||||
* | | Ensure we always use instances of the adapter specific column class | Sean Griffin | 2014-05-28 | 1 | -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 Aggarwal | 2014-05-26 | 1 | -1/+1 |
| | | |||||
* | | Move parsing of PG sql strings for defaults out of column | Sean Griffin | 2014-05-23 | 1 | -1/+3 |
| | | |||||
* | | Allow additional arguments to be used during type map lookups | Sean Griffin | 2014-05-22 | 1 | -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 Senn | 2014-05-19 | 1 | -18/+1 |
| | | | | | | | | Partial revert of c0bfc3f412834ffe8327a15ae3a46602cc28e425 | ||||
* | | :scissors: | Rafael Mendonça França | 2014-05-14 | 1 | -1/+0 |
| | | |||||
* | | PostgreSQLAdapter::Utils seems to be only used from a single spot - quite ↵ | kares | 2014-05-14 | 1 | -1/+19 |
| | | | | | | | | redundant | ||||
* | | PostgreSQL's SchemaStatements seems a could candidate for re-use (with AR-JDBC) | kares | 2014-05-14 | 1 | -6/+2 |
| | | |||||
* | | pg, `change_column_default` accepts `[]`. Closes #11586. | Yves Senn | 2014-05-12 | 1 | -0/+1 |
| | | |||||
* | | Handle other pk types in PostgreSQL gracefully. | Patrick Robertson | 2014-05-12 | 1 | -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 Senn | 2014-05-04 | 1 | -4/+0 |
| | | |||||
* | | Changed change_column in PG schema_statements.rb to make sure that the ↵ | Eric Chahin | 2014-04-15 | 1 | -2/+8 |
| | | | | | | | | uuid_generate function was not being quoted. | ||||
* | | PostgreSQL, adapter automatically reloads it's type map. Closes #14678. | Yves Senn | 2014-04-11 | 1 | -3/+1 |
| | | | | | | | | [Yves Senn & Matthew Draper] |