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

Add support for keyword after in options of a field #3166

Closed
wants to merge 1 commit into from
Closed

Add support for keyword after in options of a field #3166

wants to merge 1 commit into from

Conversation

sitexw
Copy link

@sitexw sitexw commented Feb 19, 2015

Add support for keyword after in options of a field (useful for migrations), only for MySQL.
And add unit test.

…rations), only for MySQL.

And add unit test.
@sitexw
Copy link
Author

sitexw commented Mar 26, 2015

Up

@mickhansen
Copy link
Contributor

@sitexw can you do a rebase?

@sitexw
Copy link
Author

sitexw commented Mar 27, 2015

I can not make the rebase, can you give me quickly what to do?

@mickhansen
Copy link
Contributor

@mickhansen
Copy link
Contributor

ping @sitexw

@sitexw
Copy link
Author

sitexw commented Apr 24, 2015

Reply from @mickhansen: bytes=32 time=50400000ms TTL=56

Hi, I'm sorry but I have not managed / understood why we must make a rebase. But also, what I have to commit to change.

@mickhansen
Copy link
Contributor

@sitexw You have to rebase so i can merge it. The branch is out of sync with master.

@BridgeAR
Copy link
Contributor

@sitexw

  1. git fetch upstream
  2. git rebase --interactive #lastestMasterCommitHash#
  3. Pick your commit
    2.1) Resolve possible conflicts
    2.1.1) git add --all .
    2.1.2) git rebase --continue
  4. git push -f

Done

@janmeier janmeier closed this in 1f67460 May 27, 2015
janmeier added a commit that referenced this pull request May 27, 2015
Add support for keyword `after` in options of a field. Closes #3166
IrfanBaqui pushed a commit to IrfanBaqui/sequelize that referenced this pull request Jun 24, 2015
IrfanBaqui pushed a commit to IrfanBaqui/sequelize that referenced this pull request Jun 24, 2015
Add support for keyword `after` in options of a field. Closes sequelize#3166
@keithvsr
Copy link

keithvsr commented Dec 2, 2022

This change doesn't add support in "options" of a field, it adds to "attributes", causing a clash with the queryInterface API documentation (https://sequelize.org/api/v6/class/src/dialects/abstract/query-interface.js~queryinterface#instance-method-addColumn) which in the example shows "after" as a key within "options" when it's actually within "attributes"

I think it makes sense to keep it as a column attribute, but the docs should match to avoid confusion. This example:

queryInterface.addColumn('tableA', 'columnC', Sequelize.STRING, {
    after: 'columnB' // after option is only supported by MySQL
});

should probably look like this instead:

queryInterface.addColumn('tableA', 'columnC', {
    type: Sequelize.STRING,
    after: 'columnB' // after option is only supported by MySQL
});

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

Successfully merging this pull request may close these issues.

None yet

4 participants