Guest User

Untitled

a guest
May 27th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. class FaveReadsSink extends RequestSink {
  2. //...
  3. //...
  4. //...
  5. Future createDatabaseSchema(ManagedContext context) async {
  6. var builder = new SchemaBuilder.toSchema(
  7. context.persistentStore,
  8. new Schema.fromDataModel(context.dataModel),
  9. isTemporary: false); // Set to false to persist our data
  10.  
  11. for (var cmd in builder.commands) {
  12. await context.persistentStore.execute(cmd);
  13. }
  14. }
  15. }
Add Comment
Please, Sign In to add comment