30 lines
710 B
Dart
30 lines
710 B
Dart
import 'package:powersync/powersync.dart';
|
|
|
|
const propertiesTable = 'properties';
|
|
const markersTable = 'markers';
|
|
|
|
Schema schema = Schema(([
|
|
const Table(
|
|
propertiesTable,
|
|
[
|
|
Column.text('list_id'),
|
|
Column.text('photo_id'),
|
|
Column.text('created_at'),
|
|
Column.text('completed_at'),
|
|
Column.text('description'),
|
|
Column.integer('completed'),
|
|
Column.text('created_by'),
|
|
Column.text('completed_by'),
|
|
],
|
|
indexes: [
|
|
// Index to allow efficient lookup within a list
|
|
Index('list', [IndexedColumn('list_id')]),
|
|
],
|
|
),
|
|
const Table('markers', [
|
|
Column.text('created_at'),
|
|
Column.text('name'),
|
|
Column.text('owner_id'),
|
|
]),
|
|
]));
|