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

pg driver and specificType #118

Closed
aidenbell opened this Issue Dec 1, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@aidenbell
Contributor

aidenbell commented Dec 1, 2013

When using pg driver, table.specificType causes a crash building the table with:

{ '0': [TypeError: Property 'typeSpecific' of object # is not a function] }

The call was:

t.specificType('geom', 'GEOMETRY(Point, 26910)');

@aidenbell

This comment has been minimized.

Contributor

aidenbell commented Dec 1, 2013

When info:

   '--- Caused by reason ---',
   'TypeError: Property \'typeSpecific\' of object #<Object> is not a function',
   '    at Object.exports.baseSchemaGrammar.getType (/node_modules/bookshelf/node_modules/knex/clients/base/schemagrammar.js:135:60)',
   '  ...[filtered frames]...',
   '    at Object.exports.baseSchemaGrammar.getColumns (/node_modules/bookshelf/node_modules/knex/clients/base/schemagrammar.js:115:50)',
   '    at Object.exports.baseSchemaGrammar.compileCreateTable (/node_modules/bookshelf/node_modules/knex/clients/base/schemagrammar.js:180:26)',
   '    at Object.exports.baseSchemaGrammar.toSql (/node_modules/bookshelf/node_modules/knex/clients/base/schemagrammar.js:79:33)',
   '    at exports.Common.toSql (/node_modules/bookshelf/node_modules/knex/lib/common.js:82:27)',
   '    at ClientBase.extend.query (/node_modules/bookshelf/node_modules/knex/clients/server/base.js:37:30)',
   '    at exports.Common.then (/node_modules/bookshelf/node_modules/knex/lib/common.js:59:53)',
   '    at schema.js:98:6' ] } ]
@aidenbell

This comment has been minimized.

Contributor

aidenbell commented Dec 1, 2013

Issue seems to be:

return this._addColumn('specific', column, {specific: type});

String 'specific' should be 'specificType'.

Running:

t._addColumn('specificType', 'geom', {
            specific: 'GEOMETRY(Point, 26910)'
        });

Manually adds the correct column.

aidenbell added a commit to aidenbell/knex that referenced this issue Dec 1, 2013

tgriesser added a commit that referenced this issue Dec 2, 2013

@tgriesser tgriesser closed this Dec 2, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment