Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Add 'AFTER column' feature in migrations; resolve #102 #105

Closed
wants to merge 87 commits into from

Conversation

SOHELAHMED7
Copy link
Contributor

@SOHELAHMED7 SOHELAHMED7 commented Sep 6, 2022

Resolve #102

Known limitations (tracked in #110 ):

Lets say we have

col_A
col_B
col_C
col_D

If we add col_B2 after col_B then it will added successfully after col_B and before col_C

If we add col_B3, col_B4, col_B5 (more than 1 column in single edit) after col_B then only col_B3 will be added after col_B. col_B4, col_B5 will be added at the end. This is due to: we need to check if previous column exist in DB due to issue #100. Once that issue is fixed, we can make changes to overcome this limitation.

@SOHELAHMED7 SOHELAHMED7 marked this pull request as ready for review September 30, 2022 11:26
@SOHELAHMED7
Copy link
Contributor Author

This pull request is ready for review

Copy link
Owner

@cebe cebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if I add a column as the first column? I do not see implementation of FIRST.

https://mariadb.com/kb/en/alter-table/

Syntax is [FIRST | AFTER col_name ] for placement of columns.

@SOHELAHMED7
Copy link
Contributor Author

What happens if I add a column as the first column? I do not see implementation of FIRST.

https://mariadb.com/kb/en/alter-table/

Syntax is [FIRST | AFTER col_name ] for placement of columns.

Yes it is missing, I am making this PR as draft

@SOHELAHMED7 SOHELAHMED7 marked this pull request as draft December 7, 2022 08:48
…b2-in-pgsql-in-library-source-code

Fix issue 126 - Don't use second db 'pg_test_db_2' in PgSQL in library source code
…-error-and-wrong-data-type-in-mysql' of https://github.com/SOHELAHMED7/yii2-openapi into 107-migrations-are-generated-with-syntax-error-and-wrong-data-type-in-mysql
…e-case-of-the-column-name

Draft - Fix issue - Quote issue to preserve the case of the column name cebe#127
…-error-and-wrong-data-type-in-mysql' of https://github.com/SOHELAHMED7/yii2-openapi into 107-migrations-are-generated-with-syntax-error-and-wrong-data-type-in-mysql
…ith-syntax-error-and-wrong-data-type-in-mysql

Fix 107-Migrations are generated with syntax error and wrong data type in MySQL
…on-in-pgsql-and-quote-it

Draft - Fix cebe#128 - Change Enum name generation in PgSQL and quote it
@SOHELAHMED7
Copy link
Contributor Author

I am closing this PR in favour of SOHELAHMED7#11

This PR contains lot of changes from master branch of my fork which is not yet merged. As a result I am facing difficulties in reviewing PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migration for new fields: Use AFTER to keep order as in schema
2 participants