Skip to content

Comments on columns postgres dialect - #4767

Closed
mwain wants to merge 1 commit into
sequelize:masterfrom
mwain:master
Closed

mwain wants to merge 1 commit into
sequelize:masterfrom
mwain:master

Conversation

@mwain

@mwain mwain commented Oct 28, 2015

Copy link
Copy Markdown

Adds column commenting for createTable and addColumn for postgres dialect.

Example usage:

queryInterface.createTable(
    'test',
    {
        id: {
            type: Sequelize.INTEGER,
            autoIncrement: true,
            primaryKey: true,
            comment: 'Unique identifier'
        }
    },
    {
        schema: 'playground'
    }
);

queryInterface.addColumn(
    {tableName: 'test', schema: 'playground'},
    'testColumn',
    {
        type: Sequelize.STRING,
        allowNull: false,
        comment: 'testing comments'
    }
);

Adds column commenting for createTable and addColumn for postgres
dialect
@mwain

mwain commented Nov 3, 2015

Copy link
Copy Markdown
Author

Not sure why travis-ci is failing, doesn't seem to be related to my pull.

@Boelensman1

Copy link
Copy Markdown

Would really like to have this functionality. When I test it locally it seems to work.

@mickhansen

Copy link
Copy Markdown
Contributor

I don't recall exactly why we didn't follow up on this but looking at it now it definitely needs some refactoring so it doesn't operate on a SQL string.

@Boelensman1

Copy link
Copy Markdown

I wouldn't mind doing that. Any tips on where to start?

@mickhansen

Copy link
Copy Markdown
Contributor

With the addColumn query generator, remember to have adequate unit testing. The problem was generally that the references code clashed with comments.

@janmeier janmeier closed this Apr 25, 2016
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.

4 participants