question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scheme.table callback called multiple times?

See original GitHub issue

It seems like calling

schema.table('tablename', function(t) {
  t.integer('id');
});
schema.table('somethignelse', function(t) {
  t.integer('fart');
});

this will alter table tablename add id(int) TWICE.

This seems to be the case when using what is in trunk, but not uploaded to npm

At least this appears to be the case I am running into, as if it was using the old callback or something

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
SeedyROMcommented, Jan 22, 2019

Just leaving a word for anybody who might stumble upon this for trying to use object destructing for the knex object in the schemaBuilder.

exports.up({ schema }, ...) // Does not work!
exports.up(knex, ...) // Does! I didn't realize schema was a getter function.

Definitely a rookie mistake, but not too far fetched an idea to try.

1reaction
wubzzcommented, Feb 16, 2018

Closing as docs has been updated to reflect this nature of the schema builder. API re-design should be in a seperate issue, if such a change is still requested.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript callback is being called multiple times
My problem is that everything is asynchronous and main is calling its callback multiple times. Does anyone have any advice on making ...
Read more >
Set up queued callback - Amazon Connect
If there is no answer when the Amazon Connect calls the customer, it retries based on the number of times you've specified. If...
Read more >
Live Visualization and Processing — bluesky 1.6.7.post2+ ...
Install a periodic callback to integrate ipykernel and asyncio event loops. It is safe to call this function multiple times. Parameters. loopevent loop, ......
Read more >
Callbacks and Events in Node.js - GeeksforGeeks
Multiple calls to the same event and listener will add the listener multiple times and correspondingly fire multiple times.
Read more >
Service | Android Developers
startService() do not nest (though they do result in multiple corresponding calls to onStartCommand()), so no matter how many times it is started...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found