Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrator `columnNames` should allow a singular variant #922

Closed
neokoenig opened this issue Feb 26, 2019 · 0 comments
Closed

migrator `columnNames` should allow a singular variant #922

neokoenig opened this issue Feb 26, 2019 · 0 comments

Comments

@neokoenig
Copy link
Member

@neokoenig neokoenig commented Feb 26, 2019

Since we do this a lot elsewhere, we should alias columnNames to columnName, i.e
t.integer(columnName='sortorder', default=0, null=false);

@neokoenig neokoenig added this to the 2.1.0 milestone Apr 30, 2019
SebastienFCT added a commit to SebastienFCT/cfwheels that referenced this issue Sep 14, 2019
This was requested for the next milestone in cfwheels#922
chapmandu added a commit that referenced this issue Sep 19, 2019
* `columnNames` should allow a singular variant

This was requested for the next milestone in #922

* Update Migration.cfc

* Implemented aliases via $combineArguments

Here's the update! (properly using `$combineArguments` rather than duplicating functions)

I also added a bunch of test for all updated function (`addInteger`, `addTime`, etc...).

Each UT tests both the regular and aliased version of the function (via `test_add_a_<type>_column` and `test_add_multiple_<type>_columns`).

Additionally, I ran all core test multiple times and got few errors:

- wheels.tests.model.crud fails with MySQL

It seems that `get("adaptername") != "MySQL"` always returns true (even if the adapter is MySQL)

- wheels.tests.model.calculations

Similar as previous, this time `ListFindNoCase("MySQL,SQLServer", get("adaptername"))` returns true for MySQL and fails for "test_sum_with_group_on_calculated_property" and "test_sum_with_group_on_calculated_property_on_associated_model"

- Few `wheels.tests.model.transactions` failed when ran with all other tests together, but were successful when run individually.

* Update CHANGELOG.md

* Typos

- Moved `migrator/addbinary` to `migrator/migration/addbinary`
- Fixed typos from PostgreeSQL to PostgreSQL
- Renamed test utility function `dbCompatible()` to `isDbCompatible()`

* Added comma padding after aguments
@chapmandu chapmandu closed this Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.