// dart format width=80
import 'package:drift/internal/versioned_schema.dart' as i0;
import 'package:drift/drift.dart' as i1;
import 'dart:typed_data' as i2;
import 'package:drift/drift.dart'; // ignore_for_file: type=lint,unused_import

// GENERATED BY drift_dev, DO NOT MODIFY.
final class Schema2 extends i0.VersionedSchema {
  Schema2({required super.database}) : super(version: 2);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
  ];
  late final Shape0 contacts = Shape0(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape1 messages = Shape1(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_20,
          _column_21,
          _column_22,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape0 extends i0.VersionedTable {
  Shape0({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get userId =>
      columnsByName['user_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get username =>
      columnsByName['username']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get displayName =>
      columnsByName['display_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get nickName =>
      columnsByName['nick_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get avatarSvg =>
      columnsByName['avatar_svg']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get myAvatarCounter =>
      columnsByName['my_avatar_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get requested =>
      columnsByName['requested']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get blocked =>
      columnsByName['blocked']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get verified =>
      columnsByName['verified']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<int> get totalMediaCounter =>
      columnsByName['total_media_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get lastMessageSend =>
      columnsByName['last_message_send']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessageReceived =>
      columnsByName['last_message_received']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastFlameCounterChange =>
      columnsByName['last_flame_counter_change']!
          as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessageExchange =>
      columnsByName['last_message_exchange']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<int> get flameCounter =>
      columnsByName['flame_counter']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_0(String aliasedName) =>
    i1.GeneratedColumn<int>('user_id', aliasedName, false,
        type: i1.DriftSqlType.int);
i1.GeneratedColumn<String> _column_1(String aliasedName) =>
    i1.GeneratedColumn<String>('username', aliasedName, false,
        type: i1.DriftSqlType.string,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways('UNIQUE'));
i1.GeneratedColumn<String> _column_2(String aliasedName) =>
    i1.GeneratedColumn<String>('display_name', aliasedName, true,
        type: i1.DriftSqlType.string);
i1.GeneratedColumn<String> _column_3(String aliasedName) =>
    i1.GeneratedColumn<String>('nick_name', aliasedName, true,
        type: i1.DriftSqlType.string);
i1.GeneratedColumn<String> _column_4(String aliasedName) =>
    i1.GeneratedColumn<String>('avatar_svg', aliasedName, true,
        type: i1.DriftSqlType.string);
i1.GeneratedColumn<int> _column_5(String aliasedName) =>
    i1.GeneratedColumn<int>('my_avatar_counter', aliasedName, false,
        type: i1.DriftSqlType.int, defaultValue: const CustomExpression('0'));
i1.GeneratedColumn<bool> _column_6(String aliasedName) =>
    i1.GeneratedColumn<bool>('accepted', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'CHECK ("accepted" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));
i1.GeneratedColumn<bool> _column_7(String aliasedName) =>
    i1.GeneratedColumn<bool>('requested', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'CHECK ("requested" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));
i1.GeneratedColumn<bool> _column_8(String aliasedName) =>
    i1.GeneratedColumn<bool>('blocked', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'CHECK ("blocked" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));
i1.GeneratedColumn<bool> _column_9(String aliasedName) =>
    i1.GeneratedColumn<bool>('verified', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'CHECK ("verified" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));
i1.GeneratedColumn<DateTime> _column_10(String aliasedName) =>
    i1.GeneratedColumn<DateTime>('created_at', aliasedName, false,
        type: i1.DriftSqlType.dateTime,
        defaultValue: const CustomExpression(
            'CAST(strftime(\'%s\', CURRENT_TIMESTAMP) AS INTEGER)'));
i1.GeneratedColumn<int> _column_11(String aliasedName) =>
    i1.GeneratedColumn<int>('total_media_counter', aliasedName, false,
        type: i1.DriftSqlType.int, defaultValue: const CustomExpression('0'));
i1.GeneratedColumn<DateTime> _column_12(String aliasedName) =>
    i1.GeneratedColumn<DateTime>('last_message_send', aliasedName, true,
        type: i1.DriftSqlType.dateTime);
i1.GeneratedColumn<DateTime> _column_13(String aliasedName) =>
    i1.GeneratedColumn<DateTime>('last_message_received', aliasedName, true,
        type: i1.DriftSqlType.dateTime);
i1.GeneratedColumn<DateTime> _column_14(String aliasedName) =>
    i1.GeneratedColumn<DateTime>('last_flame_counter_change', aliasedName, true,
        type: i1.DriftSqlType.dateTime);
i1.GeneratedColumn<DateTime> _column_15(String aliasedName) =>
    i1.GeneratedColumn<DateTime>('last_message_exchange', aliasedName, false,
        type: i1.DriftSqlType.dateTime,
        defaultValue: const CustomExpression(
            'CAST(strftime(\'%s\', CURRENT_TIMESTAMP) AS INTEGER)'));
i1.GeneratedColumn<int> _column_16(String aliasedName) =>
    i1.GeneratedColumn<int>('flame_counter', aliasedName, false,
        type: i1.DriftSqlType.int, defaultValue: const CustomExpression('0'));

class Shape1 extends i0.VersionedTable {
  Shape1({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get messageOtherId =>
      columnsByName['message_other_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get responseToMessageId =>
      columnsByName['response_to_message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get responseToOtherMessageId =>
      columnsByName['response_to_other_message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get acknowledgeByUser =>
      columnsByName['acknowledge_by_user']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get downloadState =>
      columnsByName['download_state']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get acknowledgeByServer =>
      columnsByName['acknowledge_by_server']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get errorWhileSending =>
      columnsByName['error_while_sending']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<String> get kind =>
      columnsByName['kind']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get contentJson =>
      columnsByName['content_json']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<DateTime> get openedAt =>
      columnsByName['opened_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get sendAt =>
      columnsByName['send_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get updatedAt =>
      columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_17(String aliasedName) =>
    i1.GeneratedColumn<int>('contact_id', aliasedName, false,
        type: i1.DriftSqlType.int,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'REFERENCES contacts (user_id)'));
i1.GeneratedColumn<int> _column_18(String aliasedName) =>
    i1.GeneratedColumn<int>('message_id', aliasedName, false,
        hasAutoIncrement: true,
        type: i1.DriftSqlType.int,
        defaultConstraints:
            i1.GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT'));
i1.GeneratedColumn<int> _column_19(String aliasedName) =>
    i1.GeneratedColumn<int>('message_other_id', aliasedName, true,
        type: i1.DriftSqlType.int);
i1.GeneratedColumn<int> _column_20(String aliasedName) =>
    i1.GeneratedColumn<int>('response_to_message_id', aliasedName, true,
        type: i1.DriftSqlType.int);
i1.GeneratedColumn<int> _column_21(String aliasedName) =>
    i1.GeneratedColumn<int>('response_to_other_message_id', aliasedName, true,
        type: i1.DriftSqlType.int);
i1.GeneratedColumn<bool> _column_22(String aliasedName) =>
    i1.GeneratedColumn<bool>('acknowledge_by_user', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'CHECK ("acknowledge_by_user" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));
i1.GeneratedColumn<int> _column_23(String aliasedName) =>
    i1.GeneratedColumn<int>('download_state', aliasedName, false,
        type: i1.DriftSqlType.int, defaultValue: const CustomExpression('2'));
i1.GeneratedColumn<bool> _column_24(String aliasedName) =>
    i1.GeneratedColumn<bool>('acknowledge_by_server', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'CHECK ("acknowledge_by_server" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));
i1.GeneratedColumn<bool> _column_25(String aliasedName) =>
    i1.GeneratedColumn<bool>('error_while_sending', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'CHECK ("error_while_sending" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));
i1.GeneratedColumn<String> _column_26(String aliasedName) =>
    i1.GeneratedColumn<String>('kind', aliasedName, false,
        type: i1.DriftSqlType.string);
i1.GeneratedColumn<String> _column_27(String aliasedName) =>
    i1.GeneratedColumn<String>('content_json', aliasedName, true,
        type: i1.DriftSqlType.string);
i1.GeneratedColumn<DateTime> _column_28(String aliasedName) =>
    i1.GeneratedColumn<DateTime>('opened_at', aliasedName, true,
        type: i1.DriftSqlType.dateTime);
i1.GeneratedColumn<DateTime> _column_29(String aliasedName) =>
    i1.GeneratedColumn<DateTime>('send_at', aliasedName, false,
        type: i1.DriftSqlType.dateTime,
        defaultValue: const CustomExpression(
            'CAST(strftime(\'%s\', CURRENT_TIMESTAMP) AS INTEGER)'));
i1.GeneratedColumn<DateTime> _column_30(String aliasedName) =>
    i1.GeneratedColumn<DateTime>('updated_at', aliasedName, false,
        type: i1.DriftSqlType.dateTime,
        defaultValue: const CustomExpression(
            'CAST(strftime(\'%s\', CURRENT_TIMESTAMP) AS INTEGER)'));

class Shape2 extends i0.VersionedTable {
  Shape2({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get deviceId =>
      columnsByName['device_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get name =>
      columnsByName['name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get identityKey =>
      columnsByName['identity_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_31(String aliasedName) =>
    i1.GeneratedColumn<int>('device_id', aliasedName, false,
        type: i1.DriftSqlType.int);
i1.GeneratedColumn<String> _column_32(String aliasedName) =>
    i1.GeneratedColumn<String>('name', aliasedName, false,
        type: i1.DriftSqlType.string);
i1.GeneratedColumn<i2.Uint8List> _column_33(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>('identity_key', aliasedName, false,
        type: i1.DriftSqlType.blob);

class Shape3 extends i0.VersionedTable {
  Shape3({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get preKeyId =>
      columnsByName['pre_key_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get preKey =>
      columnsByName['pre_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_34(String aliasedName) =>
    i1.GeneratedColumn<int>('pre_key_id', aliasedName, false,
        type: i1.DriftSqlType.int);
i1.GeneratedColumn<i2.Uint8List> _column_35(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>('pre_key', aliasedName, false,
        type: i1.DriftSqlType.blob);

class Shape4 extends i0.VersionedTable {
  Shape4({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get senderKeyName =>
      columnsByName['sender_key_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get senderKey =>
      columnsByName['sender_key']! as i1.GeneratedColumn<i2.Uint8List>;
}

i1.GeneratedColumn<String> _column_36(String aliasedName) =>
    i1.GeneratedColumn<String>('sender_key_name', aliasedName, false,
        type: i1.DriftSqlType.string);
i1.GeneratedColumn<i2.Uint8List> _column_37(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>('sender_key', aliasedName, false,
        type: i1.DriftSqlType.blob);

class Shape5 extends i0.VersionedTable {
  Shape5({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get deviceId =>
      columnsByName['device_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get name =>
      columnsByName['name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get sessionRecord =>
      columnsByName['session_record']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<i2.Uint8List> _column_38(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>('session_record', aliasedName, false,
        type: i1.DriftSqlType.blob);

final class Schema3 extends i0.VersionedSchema {
  Schema3({required super.database}) : super(version: 3);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
  ];
  late final Shape6 contacts = Shape6(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape1 messages = Shape1(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_20,
          _column_21,
          _column_22,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape6 extends i0.VersionedTable {
  Shape6({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get userId =>
      columnsByName['user_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get username =>
      columnsByName['username']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get displayName =>
      columnsByName['display_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get nickName =>
      columnsByName['nick_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get avatarSvg =>
      columnsByName['avatar_svg']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get myAvatarCounter =>
      columnsByName['my_avatar_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get requested =>
      columnsByName['requested']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get blocked =>
      columnsByName['blocked']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get verified =>
      columnsByName['verified']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get archived =>
      columnsByName['archived']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get deleteMessagesAfterXMinutes =>
      columnsByName['delete_messages_after_x_minutes']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<int> get totalMediaCounter =>
      columnsByName['total_media_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get lastMessageSend =>
      columnsByName['last_message_send']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessageReceived =>
      columnsByName['last_message_received']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastFlameCounterChange =>
      columnsByName['last_flame_counter_change']!
          as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessageExchange =>
      columnsByName['last_message_exchange']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<int> get flameCounter =>
      columnsByName['flame_counter']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<bool> _column_39(String aliasedName) =>
    i1.GeneratedColumn<bool>('archived', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'CHECK ("archived" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));
i1.GeneratedColumn<int> _column_40(String aliasedName) =>
    i1.GeneratedColumn<int>(
        'delete_messages_after_x_minutes', aliasedName, false,
        type: i1.DriftSqlType.int,
        defaultValue: const CustomExpression('1440'));

final class Schema4 extends i0.VersionedSchema {
  Schema4({required super.database}) : super(version: 4);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
  ];
  late final Shape6 contacts = Shape6(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape1 messages = Shape1(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_20,
          _column_21,
          _column_22,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape7 mediaUploads = Shape7(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_43,
          _column_44,
          _column_45,
          _column_46,
          _column_47,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape7 extends i0.VersionedTable {
  Shape7({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get mediaUploadId =>
      columnsByName['media_upload_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get state =>
      columnsByName['state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get metadata =>
      columnsByName['metadata']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get messageIds =>
      columnsByName['message_ids']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get encryptionData =>
      columnsByName['encryption_data']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get uploadTokens =>
      columnsByName['upload_tokens']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get alreadyNotified =>
      columnsByName['already_notified']! as i1.GeneratedColumn<String>;
}

i1.GeneratedColumn<int> _column_41(String aliasedName) =>
    i1.GeneratedColumn<int>('media_upload_id', aliasedName, false,
        hasAutoIncrement: true,
        type: i1.DriftSqlType.int,
        defaultConstraints:
            i1.GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT'));
i1.GeneratedColumn<String> _column_42(String aliasedName) =>
    i1.GeneratedColumn<String>('state', aliasedName, false,
        type: i1.DriftSqlType.string,
        defaultValue: const CustomExpression('\'pending\''));
i1.GeneratedColumn<String> _column_43(String aliasedName) =>
    i1.GeneratedColumn<String>('metadata', aliasedName, false,
        type: i1.DriftSqlType.string);
i1.GeneratedColumn<String> _column_44(String aliasedName) =>
    i1.GeneratedColumn<String>('message_ids', aliasedName, true,
        type: i1.DriftSqlType.string);
i1.GeneratedColumn<String> _column_45(String aliasedName) =>
    i1.GeneratedColumn<String>('encryption_data', aliasedName, true,
        type: i1.DriftSqlType.string);
i1.GeneratedColumn<String> _column_46(String aliasedName) =>
    i1.GeneratedColumn<String>('upload_tokens', aliasedName, true,
        type: i1.DriftSqlType.string);
i1.GeneratedColumn<String> _column_47(String aliasedName) =>
    i1.GeneratedColumn<String>('already_notified', aliasedName, false,
        type: i1.DriftSqlType.string,
        defaultValue: const CustomExpression('\'[]\''));

final class Schema5 extends i0.VersionedSchema {
  Schema5({required super.database}) : super(version: 5);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    mediaDownloads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
  ];
  late final Shape6 contacts = Shape6(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape8 messages = Shape8(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape7 mediaUploads = Shape7(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_43,
          _column_44,
          _column_45,
          _column_46,
          _column_47,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape9 mediaDownloads = Shape9(
      source: i0.VersionedTable(
        entityName: 'media_downloads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_50,
          _column_51,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape8 extends i0.VersionedTable {
  Shape8({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get messageOtherId =>
      columnsByName['message_other_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaUploadId =>
      columnsByName['media_upload_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaDownloadId =>
      columnsByName['media_download_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get responseToMessageId =>
      columnsByName['response_to_message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get responseToOtherMessageId =>
      columnsByName['response_to_other_message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get acknowledgeByUser =>
      columnsByName['acknowledge_by_user']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get downloadState =>
      columnsByName['download_state']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get acknowledgeByServer =>
      columnsByName['acknowledge_by_server']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get errorWhileSending =>
      columnsByName['error_while_sending']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<String> get kind =>
      columnsByName['kind']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get contentJson =>
      columnsByName['content_json']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<DateTime> get openedAt =>
      columnsByName['opened_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get sendAt =>
      columnsByName['send_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get updatedAt =>
      columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_48(String aliasedName) =>
    i1.GeneratedColumn<int>('media_upload_id', aliasedName, true,
        type: i1.DriftSqlType.int);
i1.GeneratedColumn<int> _column_49(String aliasedName) =>
    i1.GeneratedColumn<int>('media_download_id', aliasedName, true,
        type: i1.DriftSqlType.int);

class Shape9 extends i0.VersionedTable {
  Shape9({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get downloadToken =>
      columnsByName['download_token']! as i1.GeneratedColumn<String>;
}

i1.GeneratedColumn<int> _column_50(String aliasedName) =>
    i1.GeneratedColumn<int>('message_id', aliasedName, false,
        type: i1.DriftSqlType.int);
i1.GeneratedColumn<String> _column_51(String aliasedName) =>
    i1.GeneratedColumn<String>('download_token', aliasedName, false,
        type: i1.DriftSqlType.string);

final class Schema6 extends i0.VersionedSchema {
  Schema6({required super.database}) : super(version: 6);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    mediaDownloads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
  ];
  late final Shape6 contacts = Shape6(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape10 messages = Shape10(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape7 mediaUploads = Shape7(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_43,
          _column_44,
          _column_45,
          _column_46,
          _column_47,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape9 mediaDownloads = Shape9(
      source: i0.VersionedTable(
        entityName: 'media_downloads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_50,
          _column_51,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape10 extends i0.VersionedTable {
  Shape10({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get messageOtherId =>
      columnsByName['message_other_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaUploadId =>
      columnsByName['media_upload_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaDownloadId =>
      columnsByName['media_download_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get responseToMessageId =>
      columnsByName['response_to_message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get responseToOtherMessageId =>
      columnsByName['response_to_other_message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get acknowledgeByUser =>
      columnsByName['acknowledge_by_user']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get mediaStored =>
      columnsByName['media_stored']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get downloadState =>
      columnsByName['download_state']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get acknowledgeByServer =>
      columnsByName['acknowledge_by_server']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get errorWhileSending =>
      columnsByName['error_while_sending']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<String> get kind =>
      columnsByName['kind']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get contentJson =>
      columnsByName['content_json']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<DateTime> get openedAt =>
      columnsByName['opened_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get sendAt =>
      columnsByName['send_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get updatedAt =>
      columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<bool> _column_52(String aliasedName) =>
    i1.GeneratedColumn<bool>('media_stored', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'CHECK ("media_stored" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));

final class Schema7 extends i0.VersionedSchema {
  Schema7({required super.database}) : super(version: 7);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    mediaDownloads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
  ];
  late final Shape11 contacts = Shape11(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_53,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape10 messages = Shape10(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape7 mediaUploads = Shape7(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_43,
          _column_44,
          _column_45,
          _column_46,
          _column_47,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape9 mediaDownloads = Shape9(
      source: i0.VersionedTable(
        entityName: 'media_downloads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_50,
          _column_51,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape11 extends i0.VersionedTable {
  Shape11({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get userId =>
      columnsByName['user_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get username =>
      columnsByName['username']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get displayName =>
      columnsByName['display_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get nickName =>
      columnsByName['nick_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get avatarSvg =>
      columnsByName['avatar_svg']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get myAvatarCounter =>
      columnsByName['my_avatar_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get requested =>
      columnsByName['requested']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get blocked =>
      columnsByName['blocked']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get verified =>
      columnsByName['verified']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get archived =>
      columnsByName['archived']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get pinned =>
      columnsByName['pinned']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get deleteMessagesAfterXMinutes =>
      columnsByName['delete_messages_after_x_minutes']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<int> get totalMediaCounter =>
      columnsByName['total_media_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get lastMessageSend =>
      columnsByName['last_message_send']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessageReceived =>
      columnsByName['last_message_received']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastFlameCounterChange =>
      columnsByName['last_flame_counter_change']!
          as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessageExchange =>
      columnsByName['last_message_exchange']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<int> get flameCounter =>
      columnsByName['flame_counter']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<bool> _column_53(String aliasedName) =>
    i1.GeneratedColumn<bool>('pinned', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints:
            i1.GeneratedColumn.constraintIsAlways('CHECK ("pinned" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));

final class Schema8 extends i0.VersionedSchema {
  Schema8({required super.database}) : super(version: 8);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    mediaDownloads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
  ];
  late final Shape12 contacts = Shape12(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_53,
          _column_54,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_55,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape10 messages = Shape10(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape7 mediaUploads = Shape7(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_43,
          _column_44,
          _column_45,
          _column_46,
          _column_47,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape9 mediaDownloads = Shape9(
      source: i0.VersionedTable(
        entityName: 'media_downloads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_50,
          _column_51,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape12 extends i0.VersionedTable {
  Shape12({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get userId =>
      columnsByName['user_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get username =>
      columnsByName['username']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get displayName =>
      columnsByName['display_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get nickName =>
      columnsByName['nick_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get avatarSvg =>
      columnsByName['avatar_svg']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get myAvatarCounter =>
      columnsByName['my_avatar_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get requested =>
      columnsByName['requested']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get blocked =>
      columnsByName['blocked']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get verified =>
      columnsByName['verified']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get archived =>
      columnsByName['archived']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get pinned =>
      columnsByName['pinned']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get alsoBestFriend =>
      columnsByName['also_best_friend']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get deleteMessagesAfterXMinutes =>
      columnsByName['delete_messages_after_x_minutes']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<int> get totalMediaCounter =>
      columnsByName['total_media_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get lastMessageSend =>
      columnsByName['last_message_send']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessageReceived =>
      columnsByName['last_message_received']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastFlameCounterChange =>
      columnsByName['last_flame_counter_change']!
          as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastFlameSync =>
      columnsByName['last_flame_sync']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessageExchange =>
      columnsByName['last_message_exchange']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<int> get flameCounter =>
      columnsByName['flame_counter']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<bool> _column_54(String aliasedName) =>
    i1.GeneratedColumn<bool>('also_best_friend', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'CHECK ("also_best_friend" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));
i1.GeneratedColumn<DateTime> _column_55(String aliasedName) =>
    i1.GeneratedColumn<DateTime>('last_flame_sync', aliasedName, true,
        type: i1.DriftSqlType.dateTime);

final class Schema9 extends i0.VersionedSchema {
  Schema9({required super.database}) : super(version: 9);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    mediaDownloads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
  ];
  late final Shape12 contacts = Shape12(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_53,
          _column_54,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_55,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape10 messages = Shape10(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape7 mediaUploads = Shape7(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_56,
          _column_44,
          _column_45,
          _column_46,
          _column_47,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape9 mediaDownloads = Shape9(
      source: i0.VersionedTable(
        entityName: 'media_downloads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_50,
          _column_51,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

i1.GeneratedColumn<String> _column_56(String aliasedName) =>
    i1.GeneratedColumn<String>('metadata', aliasedName, true,
        type: i1.DriftSqlType.string);

final class Schema10 extends i0.VersionedSchema {
  Schema10({required super.database}) : super(version: 10);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    mediaDownloads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
  ];
  late final Shape13 contacts = Shape13(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_53,
          _column_57,
          _column_54,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_55,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape10 messages = Shape10(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape7 mediaUploads = Shape7(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_56,
          _column_44,
          _column_45,
          _column_46,
          _column_47,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape9 mediaDownloads = Shape9(
      source: i0.VersionedTable(
        entityName: 'media_downloads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_50,
          _column_51,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape14 signalContactPreKeys = Shape14(
      source: i0.VersionedTable(
        entityName: 'signal_contact_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id, pre_key_id)',
        ],
        columns: [
          _column_58,
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape15 signalContactSignedPreKeys = Shape15(
      source: i0.VersionedTable(
        entityName: 'signal_contact_signed_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id)',
        ],
        columns: [
          _column_58,
          _column_59,
          _column_60,
          _column_61,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape13 extends i0.VersionedTable {
  Shape13({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get userId =>
      columnsByName['user_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get username =>
      columnsByName['username']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get displayName =>
      columnsByName['display_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get nickName =>
      columnsByName['nick_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get avatarSvg =>
      columnsByName['avatar_svg']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get myAvatarCounter =>
      columnsByName['my_avatar_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get requested =>
      columnsByName['requested']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get blocked =>
      columnsByName['blocked']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get verified =>
      columnsByName['verified']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get archived =>
      columnsByName['archived']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get pinned =>
      columnsByName['pinned']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get deleted =>
      columnsByName['deleted']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get alsoBestFriend =>
      columnsByName['also_best_friend']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get deleteMessagesAfterXMinutes =>
      columnsByName['delete_messages_after_x_minutes']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<int> get totalMediaCounter =>
      columnsByName['total_media_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get lastMessageSend =>
      columnsByName['last_message_send']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessageReceived =>
      columnsByName['last_message_received']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastFlameCounterChange =>
      columnsByName['last_flame_counter_change']!
          as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastFlameSync =>
      columnsByName['last_flame_sync']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessageExchange =>
      columnsByName['last_message_exchange']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<int> get flameCounter =>
      columnsByName['flame_counter']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<bool> _column_57(String aliasedName) =>
    i1.GeneratedColumn<bool>('deleted', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'CHECK ("deleted" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));

class Shape14 extends i0.VersionedTable {
  Shape14({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get preKeyId =>
      columnsByName['pre_key_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get preKey =>
      columnsByName['pre_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_58(String aliasedName) =>
    i1.GeneratedColumn<int>('contact_id', aliasedName, false,
        type: i1.DriftSqlType.int);

class Shape15 extends i0.VersionedTable {
  Shape15({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get signedPreKeyId =>
      columnsByName['signed_pre_key_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get signedPreKey =>
      columnsByName['signed_pre_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get signedPreKeySignature =>
      columnsByName['signed_pre_key_signature']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_59(String aliasedName) =>
    i1.GeneratedColumn<int>('signed_pre_key_id', aliasedName, false,
        type: i1.DriftSqlType.int);
i1.GeneratedColumn<i2.Uint8List> _column_60(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>('signed_pre_key', aliasedName, false,
        type: i1.DriftSqlType.blob);
i1.GeneratedColumn<i2.Uint8List> _column_61(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
        'signed_pre_key_signature', aliasedName, false,
        type: i1.DriftSqlType.blob);

final class Schema11 extends i0.VersionedSchema {
  Schema11({required super.database}) : super(version: 11);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    mediaDownloads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageRetransmissions,
  ];
  late final Shape13 contacts = Shape13(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_53,
          _column_57,
          _column_54,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_55,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape10 messages = Shape10(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape7 mediaUploads = Shape7(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_56,
          _column_44,
          _column_45,
          _column_46,
          _column_47,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape9 mediaDownloads = Shape9(
      source: i0.VersionedTable(
        entityName: 'media_downloads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_50,
          _column_51,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape14 signalContactPreKeys = Shape14(
      source: i0.VersionedTable(
        entityName: 'signal_contact_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id, pre_key_id)',
        ],
        columns: [
          _column_58,
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape15 signalContactSignedPreKeys = Shape15(
      source: i0.VersionedTable(
        entityName: 'signal_contact_signed_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id)',
        ],
        columns: [
          _column_58,
          _column_59,
          _column_60,
          _column_61,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape16 messageRetransmissions = Shape16(
      source: i0.VersionedTable(
        entityName: 'message_retransmissions',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_62,
          _column_63,
          _column_64,
          _column_65,
          _column_66,
          _column_67,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape16 extends i0.VersionedTable {
  Shape16({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get retransmissionId =>
      columnsByName['retransmission_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get plaintextContent =>
      columnsByName['plaintext_content']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get pushData =>
      columnsByName['push_data']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get acknowledgeByServerAt =>
      columnsByName['acknowledge_by_server_at']!
          as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_62(String aliasedName) =>
    i1.GeneratedColumn<int>('retransmission_id', aliasedName, false,
        hasAutoIncrement: true,
        type: i1.DriftSqlType.int,
        defaultConstraints:
            i1.GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT'));
i1.GeneratedColumn<int> _column_63(String aliasedName) =>
    i1.GeneratedColumn<int>('contact_id', aliasedName, false,
        type: i1.DriftSqlType.int,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'REFERENCES contacts (user_id) ON DELETE CASCADE'));
i1.GeneratedColumn<int> _column_64(String aliasedName) =>
    i1.GeneratedColumn<int>('message_id', aliasedName, true,
        type: i1.DriftSqlType.int,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'REFERENCES messages (message_id) ON DELETE CASCADE'));
i1.GeneratedColumn<i2.Uint8List> _column_65(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>('plaintext_content', aliasedName, false,
        type: i1.DriftSqlType.blob);
i1.GeneratedColumn<i2.Uint8List> _column_66(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>('push_data', aliasedName, true,
        type: i1.DriftSqlType.blob);
i1.GeneratedColumn<DateTime> _column_67(String aliasedName) =>
    i1.GeneratedColumn<DateTime>('acknowledge_by_server_at', aliasedName, true,
        type: i1.DriftSqlType.dateTime);

final class Schema12 extends i0.VersionedSchema {
  Schema12({required super.database}) : super(version: 12);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    mediaDownloads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageRetransmissions,
  ];
  late final Shape13 contacts = Shape13(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_53,
          _column_57,
          _column_54,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_55,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape10 messages = Shape10(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape7 mediaUploads = Shape7(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_56,
          _column_44,
          _column_45,
          _column_46,
          _column_47,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape9 mediaDownloads = Shape9(
      source: i0.VersionedTable(
        entityName: 'media_downloads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_50,
          _column_51,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape14 signalContactPreKeys = Shape14(
      source: i0.VersionedTable(
        entityName: 'signal_contact_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id, pre_key_id)',
        ],
        columns: [
          _column_58,
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape15 signalContactSignedPreKeys = Shape15(
      source: i0.VersionedTable(
        entityName: 'signal_contact_signed_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id)',
        ],
        columns: [
          _column_58,
          _column_59,
          _column_60,
          _column_61,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape17 messageRetransmissions = Shape17(
      source: i0.VersionedTable(
        entityName: 'message_retransmissions',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_62,
          _column_63,
          _column_64,
          _column_65,
          _column_66,
          _column_68,
          _column_67,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape17 extends i0.VersionedTable {
  Shape17({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get retransmissionId =>
      columnsByName['retransmission_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get plaintextContent =>
      columnsByName['plaintext_content']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get pushData =>
      columnsByName['push_data']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<bool> get willNotGetACKByUser =>
      columnsByName['will_not_get_a_c_k_by_user']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<DateTime> get acknowledgeByServerAt =>
      columnsByName['acknowledge_by_server_at']!
          as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<bool> _column_68(String aliasedName) =>
    i1.GeneratedColumn<bool>('will_not_get_a_c_k_by_user', aliasedName, false,
        type: i1.DriftSqlType.bool,
        defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
            'CHECK ("will_not_get_a_c_k_by_user" IN (0, 1))'),
        defaultValue: const CustomExpression('0'));

final class Schema13 extends i0.VersionedSchema {
  Schema13({required super.database}) : super(version: 13);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    mediaDownloads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageRetransmissions,
  ];
  late final Shape13 contacts = Shape13(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_53,
          _column_57,
          _column_54,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_55,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape10 messages = Shape10(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape7 mediaUploads = Shape7(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_56,
          _column_44,
          _column_45,
          _column_46,
          _column_47,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape9 mediaDownloads = Shape9(
      source: i0.VersionedTable(
        entityName: 'media_downloads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_50,
          _column_51,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape14 signalContactPreKeys = Shape14(
      source: i0.VersionedTable(
        entityName: 'signal_contact_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id, pre_key_id)',
        ],
        columns: [
          _column_58,
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape15 signalContactSignedPreKeys = Shape15(
      source: i0.VersionedTable(
        entityName: 'signal_contact_signed_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id)',
        ],
        columns: [
          _column_58,
          _column_59,
          _column_60,
          _column_61,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape16 messageRetransmissions = Shape16(
      source: i0.VersionedTable(
        entityName: 'message_retransmissions',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_62,
          _column_63,
          _column_64,
          _column_65,
          _column_66,
          _column_67,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

final class Schema14 extends i0.VersionedSchema {
  Schema14({required super.database}) : super(version: 14);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    mediaDownloads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageRetransmissions,
  ];
  late final Shape13 contacts = Shape13(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_53,
          _column_57,
          _column_54,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_55,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape10 messages = Shape10(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape7 mediaUploads = Shape7(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_56,
          _column_44,
          _column_45,
          _column_46,
          _column_47,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape9 mediaDownloads = Shape9(
      source: i0.VersionedTable(
        entityName: 'media_downloads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_50,
          _column_51,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape14 signalContactPreKeys = Shape14(
      source: i0.VersionedTable(
        entityName: 'signal_contact_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id, pre_key_id)',
        ],
        columns: [
          _column_58,
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape15 signalContactSignedPreKeys = Shape15(
      source: i0.VersionedTable(
        entityName: 'signal_contact_signed_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id)',
        ],
        columns: [
          _column_58,
          _column_59,
          _column_60,
          _column_61,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape18 messageRetransmissions = Shape18(
      source: i0.VersionedTable(
        entityName: 'message_retransmissions',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_62,
          _column_63,
          _column_64,
          _column_65,
          _column_66,
          _column_69,
          _column_67,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape18 extends i0.VersionedTable {
  Shape18({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get retransmissionId =>
      columnsByName['retransmission_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get plaintextContent =>
      columnsByName['plaintext_content']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get pushData =>
      columnsByName['push_data']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptedHash =>
      columnsByName['encrypted_hash']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get acknowledgeByServerAt =>
      columnsByName['acknowledge_by_server_at']!
          as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<i2.Uint8List> _column_69(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>('encrypted_hash', aliasedName, true,
        type: i1.DriftSqlType.blob);

final class Schema15 extends i0.VersionedSchema {
  Schema15({required super.database}) : super(version: 15);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    mediaDownloads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageRetransmissions,
  ];
  late final Shape13 contacts = Shape13(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_53,
          _column_57,
          _column_54,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_55,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape19 messages = Shape19(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_70,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape20 mediaUploads = Shape20(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_56,
          _column_44,
          _column_45,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape9 mediaDownloads = Shape9(
      source: i0.VersionedTable(
        entityName: 'media_downloads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_50,
          _column_51,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape14 signalContactPreKeys = Shape14(
      source: i0.VersionedTable(
        entityName: 'signal_contact_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id, pre_key_id)',
        ],
        columns: [
          _column_58,
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape15 signalContactSignedPreKeys = Shape15(
      source: i0.VersionedTable(
        entityName: 'signal_contact_signed_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id)',
        ],
        columns: [
          _column_58,
          _column_59,
          _column_60,
          _column_61,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape18 messageRetransmissions = Shape18(
      source: i0.VersionedTable(
        entityName: 'message_retransmissions',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_62,
          _column_63,
          _column_64,
          _column_65,
          _column_66,
          _column_69,
          _column_67,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape19 extends i0.VersionedTable {
  Shape19({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get messageOtherId =>
      columnsByName['message_other_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaUploadId =>
      columnsByName['media_upload_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaDownloadId =>
      columnsByName['media_download_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get responseToMessageId =>
      columnsByName['response_to_message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get responseToOtherMessageId =>
      columnsByName['response_to_other_message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get acknowledgeByUser =>
      columnsByName['acknowledge_by_user']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get mediaStored =>
      columnsByName['media_stored']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get downloadState =>
      columnsByName['download_state']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get acknowledgeByServer =>
      columnsByName['acknowledge_by_server']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get errorWhileSending =>
      columnsByName['error_while_sending']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<String> get mediaRetransmissionState =>
      columnsByName['media_retransmission_state']!
          as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get kind =>
      columnsByName['kind']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get contentJson =>
      columnsByName['content_json']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<DateTime> get openedAt =>
      columnsByName['opened_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get sendAt =>
      columnsByName['send_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get updatedAt =>
      columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<String> _column_70(String aliasedName) =>
    i1.GeneratedColumn<String>('media_retransmission_state', aliasedName, false,
        type: i1.DriftSqlType.string,
        defaultValue: const CustomExpression('\'none\''));

class Shape20 extends i0.VersionedTable {
  Shape20({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get mediaUploadId =>
      columnsByName['media_upload_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get state =>
      columnsByName['state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get metadata =>
      columnsByName['metadata']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get messageIds =>
      columnsByName['message_ids']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get encryptionData =>
      columnsByName['encryption_data']! as i1.GeneratedColumn<String>;
}

final class Schema16 extends i0.VersionedSchema {
  Schema16({required super.database}) : super(version: 16);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageRetransmissions,
  ];
  late final Shape13 contacts = Shape13(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_53,
          _column_57,
          _column_54,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_55,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape19 messages = Shape19(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_70,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape20 mediaUploads = Shape20(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_56,
          _column_44,
          _column_45,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape14 signalContactPreKeys = Shape14(
      source: i0.VersionedTable(
        entityName: 'signal_contact_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id, pre_key_id)',
        ],
        columns: [
          _column_58,
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape15 signalContactSignedPreKeys = Shape15(
      source: i0.VersionedTable(
        entityName: 'signal_contact_signed_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id)',
        ],
        columns: [
          _column_58,
          _column_59,
          _column_60,
          _column_61,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape18 messageRetransmissions = Shape18(
      source: i0.VersionedTable(
        entityName: 'message_retransmissions',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_62,
          _column_63,
          _column_64,
          _column_65,
          _column_66,
          _column_69,
          _column_67,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

final class Schema17 extends i0.VersionedSchema {
  Schema17({required super.database}) : super(version: 17);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    messages,
    mediaUploads,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageRetransmissions,
  ];
  late final Shape13 contacts = Shape13(
      source: i0.VersionedTable(
        entityName: 'contacts',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(user_id)',
        ],
        columns: [
          _column_0,
          _column_1,
          _column_2,
          _column_3,
          _column_4,
          _column_5,
          _column_6,
          _column_7,
          _column_8,
          _column_9,
          _column_39,
          _column_53,
          _column_57,
          _column_54,
          _column_40,
          _column_10,
          _column_11,
          _column_12,
          _column_13,
          _column_14,
          _column_55,
          _column_15,
          _column_16,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape19 messages = Shape19(
      source: i0.VersionedTable(
        entityName: 'messages',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_17,
          _column_18,
          _column_19,
          _column_48,
          _column_49,
          _column_20,
          _column_21,
          _column_22,
          _column_52,
          _column_23,
          _column_24,
          _column_25,
          _column_70,
          _column_26,
          _column_27,
          _column_28,
          _column_29,
          _column_30,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape20 mediaUploads = Shape20(
      source: i0.VersionedTable(
        entityName: 'media_uploads',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_41,
          _column_42,
          _column_56,
          _column_44,
          _column_45,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape2 signalIdentityKeyStores = Shape2(
      source: i0.VersionedTable(
        entityName: 'signal_identity_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_33,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape3 signalPreKeyStores = Shape3(
      source: i0.VersionedTable(
        entityName: 'signal_pre_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(pre_key_id)',
        ],
        columns: [
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape4 signalSenderKeyStores = Shape4(
      source: i0.VersionedTable(
        entityName: 'signal_sender_key_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(sender_key_name)',
        ],
        columns: [
          _column_36,
          _column_37,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape5 signalSessionStores = Shape5(
      source: i0.VersionedTable(
        entityName: 'signal_session_stores',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(device_id, name)',
        ],
        columns: [
          _column_31,
          _column_32,
          _column_38,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape14 signalContactPreKeys = Shape14(
      source: i0.VersionedTable(
        entityName: 'signal_contact_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id, pre_key_id)',
        ],
        columns: [
          _column_58,
          _column_34,
          _column_35,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape15 signalContactSignedPreKeys = Shape15(
      source: i0.VersionedTable(
        entityName: 'signal_contact_signed_pre_keys',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [
          'PRIMARY KEY(contact_id)',
        ],
        columns: [
          _column_58,
          _column_59,
          _column_60,
          _column_61,
          _column_10,
        ],
        attachedDatabase: database,
      ),
      alias: null);
  late final Shape21 messageRetransmissions = Shape21(
      source: i0.VersionedTable(
        entityName: 'message_retransmissions',
        withoutRowId: false,
        isStrict: false,
        tableConstraints: [],
        columns: [
          _column_62,
          _column_63,
          _column_64,
          _column_65,
          _column_66,
          _column_69,
          _column_71,
          _column_72,
          _column_67,
        ],
        attachedDatabase: database,
      ),
      alias: null);
}

class Shape21 extends i0.VersionedTable {
  Shape21({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get retransmissionId =>
      columnsByName['retransmission_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get plaintextContent =>
      columnsByName['plaintext_content']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get pushData =>
      columnsByName['push_data']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptedHash =>
      columnsByName['encrypted_hash']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get retryCount =>
      columnsByName['retry_count']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get lastRetry =>
      columnsByName['last_retry']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get acknowledgeByServerAt =>
      columnsByName['acknowledge_by_server_at']!
          as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_71(String aliasedName) =>
    i1.GeneratedColumn<int>('retry_count', aliasedName, false,
        type: i1.DriftSqlType.int, defaultValue: const CustomExpression('0'));
i1.GeneratedColumn<DateTime> _column_72(String aliasedName) =>
    i1.GeneratedColumn<DateTime>('last_retry', aliasedName, true,
        type: i1.DriftSqlType.dateTime);
i0.MigrationStepWithVersion migrationSteps({
  required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2,
  required Future<void> Function(i1.Migrator m, Schema3 schema) from2To3,
  required Future<void> Function(i1.Migrator m, Schema4 schema) from3To4,
  required Future<void> Function(i1.Migrator m, Schema5 schema) from4To5,
  required Future<void> Function(i1.Migrator m, Schema6 schema) from5To6,
  required Future<void> Function(i1.Migrator m, Schema7 schema) from6To7,
  required Future<void> Function(i1.Migrator m, Schema8 schema) from7To8,
  required Future<void> Function(i1.Migrator m, Schema9 schema) from8To9,
  required Future<void> Function(i1.Migrator m, Schema10 schema) from9To10,
  required Future<void> Function(i1.Migrator m, Schema11 schema) from10To11,
  required Future<void> Function(i1.Migrator m, Schema12 schema) from11To12,
  required Future<void> Function(i1.Migrator m, Schema13 schema) from12To13,
  required Future<void> Function(i1.Migrator m, Schema14 schema) from13To14,
  required Future<void> Function(i1.Migrator m, Schema15 schema) from14To15,
  required Future<void> Function(i1.Migrator m, Schema16 schema) from15To16,
  required Future<void> Function(i1.Migrator m, Schema17 schema) from16To17,
}) {
  return (currentVersion, database) async {
    switch (currentVersion) {
      case 1:
        final schema = Schema2(database: database);
        final migrator = i1.Migrator(database, schema);
        await from1To2(migrator, schema);
        return 2;
      case 2:
        final schema = Schema3(database: database);
        final migrator = i1.Migrator(database, schema);
        await from2To3(migrator, schema);
        return 3;
      case 3:
        final schema = Schema4(database: database);
        final migrator = i1.Migrator(database, schema);
        await from3To4(migrator, schema);
        return 4;
      case 4:
        final schema = Schema5(database: database);
        final migrator = i1.Migrator(database, schema);
        await from4To5(migrator, schema);
        return 5;
      case 5:
        final schema = Schema6(database: database);
        final migrator = i1.Migrator(database, schema);
        await from5To6(migrator, schema);
        return 6;
      case 6:
        final schema = Schema7(database: database);
        final migrator = i1.Migrator(database, schema);
        await from6To7(migrator, schema);
        return 7;
      case 7:
        final schema = Schema8(database: database);
        final migrator = i1.Migrator(database, schema);
        await from7To8(migrator, schema);
        return 8;
      case 8:
        final schema = Schema9(database: database);
        final migrator = i1.Migrator(database, schema);
        await from8To9(migrator, schema);
        return 9;
      case 9:
        final schema = Schema10(database: database);
        final migrator = i1.Migrator(database, schema);
        await from9To10(migrator, schema);
        return 10;
      case 10:
        final schema = Schema11(database: database);
        final migrator = i1.Migrator(database, schema);
        await from10To11(migrator, schema);
        return 11;
      case 11:
        final schema = Schema12(database: database);
        final migrator = i1.Migrator(database, schema);
        await from11To12(migrator, schema);
        return 12;
      case 12:
        final schema = Schema13(database: database);
        final migrator = i1.Migrator(database, schema);
        await from12To13(migrator, schema);
        return 13;
      case 13:
        final schema = Schema14(database: database);
        final migrator = i1.Migrator(database, schema);
        await from13To14(migrator, schema);
        return 14;
      case 14:
        final schema = Schema15(database: database);
        final migrator = i1.Migrator(database, schema);
        await from14To15(migrator, schema);
        return 15;
      case 15:
        final schema = Schema16(database: database);
        final migrator = i1.Migrator(database, schema);
        await from15To16(migrator, schema);
        return 16;
      case 16:
        final schema = Schema17(database: database);
        final migrator = i1.Migrator(database, schema);
        await from16To17(migrator, schema);
        return 17;
      default:
        throw ArgumentError.value('Unknown migration from $currentVersion');
    }
  };
}

i1.OnUpgrade stepByStep({
  required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2,
  required Future<void> Function(i1.Migrator m, Schema3 schema) from2To3,
  required Future<void> Function(i1.Migrator m, Schema4 schema) from3To4,
  required Future<void> Function(i1.Migrator m, Schema5 schema) from4To5,
  required Future<void> Function(i1.Migrator m, Schema6 schema) from5To6,
  required Future<void> Function(i1.Migrator m, Schema7 schema) from6To7,
  required Future<void> Function(i1.Migrator m, Schema8 schema) from7To8,
  required Future<void> Function(i1.Migrator m, Schema9 schema) from8To9,
  required Future<void> Function(i1.Migrator m, Schema10 schema) from9To10,
  required Future<void> Function(i1.Migrator m, Schema11 schema) from10To11,
  required Future<void> Function(i1.Migrator m, Schema12 schema) from11To12,
  required Future<void> Function(i1.Migrator m, Schema13 schema) from12To13,
  required Future<void> Function(i1.Migrator m, Schema14 schema) from13To14,
  required Future<void> Function(i1.Migrator m, Schema15 schema) from14To15,
  required Future<void> Function(i1.Migrator m, Schema16 schema) from15To16,
  required Future<void> Function(i1.Migrator m, Schema17 schema) from16To17,
}) =>
    i0.VersionedSchema.stepByStepHelper(
        step: migrationSteps(
      from1To2: from1To2,
      from2To3: from2To3,
      from3To4: from3To4,
      from4To5: from4To5,
      from5To6: from5To6,
      from6To7: from6To7,
      from7To8: from7To8,
      from8To9: from8To9,
      from9To10: from9To10,
      from10To11: from10To11,
      from11To12: from11To12,
      from12To13: from12To13,
      from13To14: from13To14,
      from14To15: from14To15,
      from15To16: from15To16,
      from16To17: from16To17,
    ));
