You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which can then be consumed when calling Model.sync():
constdatabase=newDatabase();awaitdatabase.sync();// compares indexes of tables in database and Model.indexes, // then calls driver.addIndex or driver.removeIndex correspondingly
In the ActiveRecord like use case, we can store the indexes fetched when loading schema info from database:
constdatabase=newDatabase();awaitdatabase.connect();// if Model.indexes exists, compares the fetched and the declared, set Model.synchronized if everything match// if Model.indexes doesn't exist, set the fetched indexes to Model.indexes
The text was updated successfully, but these errors were encountered:
Model needs someway to declare table indexes in class, here's a proposal:
which can then be consumed when calling
Model.sync()
:In the ActiveRecord like use case, we can store the indexes fetched when loading schema info from database:
The text was updated successfully, but these errors were encountered: