| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
We don't actually need to enumerate the possible types here any more;
that dates back to before e105e599e706780905d4c348394da989de3b200f, when
they were symbols, and indistinguishable from other options.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I’m renaming all instances of `use_transcational_fixtures` to
`use_transactional_tests` and “transactional fixtures” to
“transactional tests”.
I’m deprecating `use_transactional_fixtures=`. So anyone who is
explicitly setting this will get a warning telling them to use
`use_transactional_tests=` instead.
I’m maintaining backwards compatibility—both forms will work.
`use_transactional_tests` will check to see if
`use_transactional_fixtures` is set and use that, otherwise it will use
itself. But because `use_transactional_tests` is a class attribute
(created with `class_attribute`) this requires a little bit of hoop
jumping. The writer method that `class_attribute` generates defines a
new reader method that return the value being set. Which means we can’t
set the default of `true` using `use_transactional_tests=` as was done
previously because that won’t take into account anyone using
`use_transactional_fixtures`. Instead I defined the reader method
manually and it checks `use_transactional_fixtures`. If it was set then
it should be used, otherwise it should return the default, which is
`true`. If someone uses `use_transactional_tests=` then it will
overwrite the backwards-compatible method with whatever they set.
|
|
|
|
| |
boolean tinyint(1) fields
|
| |
|
|
|
|
|
| |
Lowercase raw SQL has been replaced by 07b659c already. This commit
replaces everything else of raw SQL.
|
|
|
|
| |
Added by 101c19f55f5f1d86d35574b805278f11e9a1a48e.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The same is not true of `define_attribute`, which is meant to be the low
level no-magic API that sits underneath. The differences between the two
APIs are:
- `attribute`
- Lazy (the attribute will be defined after the schema has loaded)
- Allows either a type object or a symbol
- `define_attribute`
- Runs immediately (might get trampled by schema loading)
- Requires a type object
This was the last blocker in terms of public interface requirements
originally discussed for this feature back in May. All the
implementation blockers have been cleared, so this feature is probably
ready for release (pending one more look-over by me).
|
|
|
|
|
|
|
| |
a column type `xml` is missing in regexp pattarn. However,
`assert_equal 1, lengths.uniq.length` is success when `lengths` are all
`nil` because a column type is missing. a test will be failed by using
`compact` when a column type is missing.
|
|
|
|
|
| |
`.` is regexp meta character. It should be escape for `assert_match`
correctly.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Technically changes the API, as it will allow any object which responds
to `===`. Personally, I think this is more flexible.
|
| |
|
| |
|
| |
|
|
|
|
| |
Dump the standard schema once instead of redoing it per test
|
|
|
|
|
|
| |
Allows :limit defaults to be changed without pulling the rug out from
under old migrations that omitted :limit because it matched the default
at the time.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Since 'drop table if exists' statement does not always work with
some databases such as Oracle.
|
| |
|
| |
|
|
|
|
| |
respect `table_name_prefix` and `table_name_suffix`.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The only type that has a scale is decimal. There's a special case where
decimal columns with 0 scale are type cast to integers if the scale is
not specified. Appears to only affect schema dumping.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Auto-generate stable fixture UUIDs on PostgreSQL
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/fixtures.rb
activerecord/test/cases/adapters/postgresql/uuid_test.rb
activesupport/CHANGELOG.md
|
| |
| |
| |
| | |
Fixes: #11524
|
| |
| |
| |
| | |
citext makes it possible to use AR Hash finders for case-insensitive matching as sql UPPER/LOWER functions are not needed.
|
| | |
|
|/ |
|
|
|
|
|
|
|
| |
We can conditional define the tests depending on the adapter or
connection.
Lets keep the skip for fail tests that need to be fixed.
|
|
|
|
|
|
|
| |
This is causing every default value in PostreSQL database to being
handled as default function.
Fixes #12581
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Travis failed because the postgresql version installed there does not
support extensions, so we just need to skip this for now.
|
|
|
|
|
| |
There is no need to create the extension in the database just to test if
it's dumped, we can stub that instead.
|
|
|
|
|
| |
When extensions are supported but there's no one enabled in the
database, we should not print anything related to them in schema.rb.
|
|
|
|
| |
dumped extensions if they are unsupported by the database
|
| |
|