Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FaveReadsSink extends RequestSink {
- //...
- //...
- //...
- Future createDatabaseSchema(ManagedContext context) async {
- var builder = new SchemaBuilder.toSchema(
- context.persistentStore,
- new Schema.fromDataModel(context.dataModel),
- isTemporary: false); // Set to false to persist our data
- for (var cmd in builder.commands) {
- await context.persistentStore.execute(cmd);
- }
- }
- }
Add Comment
Please, Sign In to add comment