kSyncQueueCreateSql top-level constant

String const kSyncQueueCreateSql

Raw SQL to create the sync queue table.

Use this in your Drift migration if adding the DynosSyncQueueTable class to @DriftDatabase(tables: [...]) doesn't work cross-package:

await customStatement(kSyncQueueCreateSql);

Implementation

const kSyncQueueCreateSql = '''
  CREATE TABLE IF NOT EXISTS dynos_sync_queue (
    id TEXT NOT NULL PRIMARY KEY,
    table_name TEXT NOT NULL,
    record_id TEXT NOT NULL,
    operation TEXT NOT NULL,
    payload TEXT NOT NULL,
    created_at INTEGER NOT NULL,
    synced_at INTEGER,
    retry_count INTEGER NOT NULL DEFAULT 0,
    next_retry_at INTEGER
  )
''';