SchizoDuckie / CreateReadUpdateDelete.js

CreateReadUpdateDelete.js aims to bring you a tiny footprint (18kb compressed), platform independent ORM/ActiveRecord implementation for Javascript that works flawlessly on SQLite / WebSQL databases, or any flavor of remote database you can think of via serverside JSON API. Written in Plain Old JavaScript without any framework dependencies, you can use this with Mootools, Jquery, Zepto, Ember, or whatever your drug of choice is.
http://schizoduckie.github.io/CreateReadUpdateDelete.js/
MIT License
38 stars 5 forks source link

Can migration trigger a javascript function? #15

Closed MarioVanDenEijnde closed 7 years ago

MarioVanDenEijnde commented 8 years ago

Hello SchizoDuckie,

I need to alter a table and fire a one time function after the migration. Is this possible?

Kind regards, Mario

SchizoDuckie commented 7 years ago

There is no generic method implemented to do this currently.

You can wait for CRUD.SqliteAdapter.initializing to turn from false to true to execute a callback if you need to execute stuff ASAP, this is also how it works internally:

image