ensureSchema method

Future<void> ensureSchema()

Implementation

Future<void> ensureSchema() async {
  if (_schema) return;
  // app_release rather than release, which MySQL reserves.
  await dvEnsureFrameworkTable(
    database,
    'CREATE TABLE IF NOT EXISTS $table ('
    'id VARCHAR(128) PRIMARY KEY, '
    'install_id VARCHAR(128) NOT NULL, '
    'app_release VARCHAR(128) NOT NULL, '
    'kind VARCHAR(16) NOT NULL, '
    'fingerprint VARCHAR(64) NOT NULL, '
    'occurred_at VARCHAR(40) NOT NULL, '
    'received_at VARCHAR(40) NOT NULL, '
    'report TEXT NOT NULL)',
  );
  _schema = true;
}