// 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'; // GENERATED BY drift_dev, DO NOT MODIFY.
import 'package:twonly/src/database/tables/groups.table.dart';

// ignore_for_file: type=lint,unused_import
//
final class Schema2 extends i0.VersionedSchema {
  Schema2({required super.database}) : super(version: 2);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageActions,
    groupHistories,
  ];
  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,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape1 groups = Shape1(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_13,
        _column_14,
        _column_15,
        _column_16,
        _column_17,
        _column_18,
        _column_19,
        _column_20,
        _column_21,
        _column_22,
        _column_23,
        _column_24,
        _column_25,
        _column_26,
        _column_27,
        _column_12,
        _column_28,
        _column_29,
        _column_30,
        _column_31,
        _column_32,
        _column_33,
        _column_34,
        _column_35,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape2 mediaFiles = Shape2(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_36,
        _column_37,
        _column_38,
        _column_39,
        _column_40,
        _column_41,
        _column_42,
        _column_43,
        _column_44,
        _column_45,
        _column_46,
        _column_47,
        _column_48,
        _column_49,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape3 messages = Shape3(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_50,
        _column_51,
        _column_52,
        _column_37,
        _column_53,
        _column_54,
        _column_55,
        _column_56,
        _column_46,
        _column_57,
        _column_58,
        _column_59,
        _column_60,
        _column_12,
        _column_61,
        _column_62,
        _column_63,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape4 messageHistories = Shape4(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(id)'],
      columns: [_column_64, _column_65, _column_66, _column_53, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape5 reactions = Shape5(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_65, _column_67, _column_68, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape6 groupMembers = Shape6(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_50,
        _column_69,
        _column_70,
        _column_71,
        _column_72,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape7 receipts = Shape7(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_73,
        _column_74,
        _column_75,
        _column_76,
        _column_77,
        _column_78,
        _column_79,
        _column_80,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape8 receivedReceipts = Shape8(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_73, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape9 signalIdentityKeyStores = Shape9(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_83, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape10 signalPreKeyStores = Shape10(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_84, _column_85, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_86, _column_87],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape12 signalSessionStores = Shape12(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_88, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape13 signalContactPreKeys = Shape13(
    source: i0.VersionedTable(
      entityName: 'signal_contact_pre_keys',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id, pre_key_id)'],
      columns: [_column_74, _column_84, _column_85, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape14 signalContactSignedPreKeys = Shape14(
    source: i0.VersionedTable(
      entityName: 'signal_contact_signed_pre_keys',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id)'],
      columns: [_column_74, _column_89, _column_90, _column_91, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape15 messageActions = Shape15(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_65, _column_92, _column_37, _column_93],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape16 groupHistories = Shape16(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_94,
        _column_50,
        _column_95,
        _column_96,
        _column_97,
        _column_98,
        _column_99,
        _column_37,
        _column_93,
      ],
      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<i2.Uint8List> get avatarSvgCompressed =>
      columnsByName['avatar_svg_compressed']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get senderProfileCounter =>
      columnsByName['sender_profile_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get deletedByUser =>
      columnsByName['deleted_by_user']! 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 accountDeleted =>
      columnsByName['account_deleted']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

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,
    );
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<i2.Uint8List> _column_4(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'avatar_svg_compressed',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<int> _column_5(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'sender_profile_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>(
      'deleted_by_user',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("deleted_by_user" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<bool> _column_8(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_9(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_10(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<bool> _column_11(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'account_deleted',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("account_deleted" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<DateTime> _column_12(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'created_at',
      aliasedName,
      false,
      type: i1.DriftSqlType.dateTime,
      defaultValue: const CustomExpression(
        'CAST(strftime(\'%s\', CURRENT_TIMESTAMP) AS INTEGER)',
      ),
    );

class Shape1 extends i0.VersionedTable {
  Shape1({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<bool> get isGroupAdmin =>
      columnsByName['is_group_admin']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get isDirectChat =>
      columnsByName['is_direct_chat']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get pinned =>
      columnsByName['pinned']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get archived =>
      columnsByName['archived']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get joinedGroup =>
      columnsByName['joined_group']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get leftGroup =>
      columnsByName['left_group']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get deletedContent =>
      columnsByName['deleted_content']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get stateVersionId =>
      columnsByName['state_version_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get stateEncryptionKey =>
      columnsByName['state_encryption_key']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get myGroupPrivateKey =>
      columnsByName['my_group_private_key']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<String> get groupName =>
      columnsByName['group_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get totalMediaCounter =>
      columnsByName['total_media_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get alsoBestFriend =>
      columnsByName['also_best_friend']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get deleteMessagesAfterMilliseconds =>
      columnsByName['delete_messages_after_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
  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<int> get flameCounter =>
      columnsByName['flame_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get maxFlameCounter =>
      columnsByName['max_flame_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get maxFlameCounterFrom =>
      columnsByName['max_flame_counter_from']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessageExchange =>
      columnsByName['last_message_exchange']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<String> _column_13(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'group_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<bool> _column_14(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'is_group_admin',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("is_group_admin" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<bool> _column_15(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'is_direct_chat',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("is_direct_chat" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<bool> _column_16(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'),
    );
i1.GeneratedColumn<bool> _column_17(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<bool> _column_18(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'joined_group',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("joined_group" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<bool> _column_19(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'left_group',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("left_group" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<bool> _column_20(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'deleted_content',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("deleted_content" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_21(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'state_version_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<i2.Uint8List> _column_22(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'state_encryption_key',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<i2.Uint8List> _column_23(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'my_group_private_key',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<String> _column_24(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'group_name',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<int> _column_25(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'total_media_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<bool> _column_26(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<int> _column_27(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'delete_messages_after_milliseconds',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const CustomExpression('86400000'),
    );
i1.GeneratedColumn<DateTime> _column_28(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'last_message_send',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<DateTime> _column_29(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'last_message_received',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<DateTime> _column_30(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'last_flame_counter_change',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<DateTime> _column_31(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'last_flame_sync',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<int> _column_32(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'flame_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_33(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'max_flame_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<DateTime> _column_34(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'max_flame_counter_from',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<DateTime> _column_35(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'last_message_exchange',
      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<String> get mediaId =>
      columnsByName['media_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get uploadState =>
      columnsByName['upload_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get downloadState =>
      columnsByName['download_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<bool> get requiresAuthentication =>
      columnsByName['requires_authentication']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get stored =>
      columnsByName['stored']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get isDraftMedia =>
      columnsByName['is_draft_media']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<String> get reuploadRequestedBy =>
      columnsByName['reupload_requested_by']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get displayLimitInMilliseconds =>
      columnsByName['display_limit_in_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get removeAudio =>
      columnsByName['remove_audio']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<i2.Uint8List> get downloadToken =>
      columnsByName['download_token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionKey =>
      columnsByName['encryption_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionMac =>
      columnsByName['encryption_mac']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionNonce =>
      columnsByName['encryption_nonce']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<String> _column_36(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'media_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<String> _column_37(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'type',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<String> _column_38(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'upload_state',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<String> _column_39(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'download_state',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<bool> _column_40(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'requires_authentication',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("requires_authentication" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<bool> _column_41(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'stored',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("stored" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<bool> _column_42(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'is_draft_media',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("is_draft_media" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<String> _column_43(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'reupload_requested_by',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<int> _column_44(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'display_limit_in_milliseconds',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<bool> _column_45(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'remove_audio',
      aliasedName,
      true,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("remove_audio" IN (0, 1))',
      ),
    );
i1.GeneratedColumn<i2.Uint8List> _column_46(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'download_token',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<i2.Uint8List> _column_47(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'encryption_key',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<i2.Uint8List> _column_48(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'encryption_mac',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<i2.Uint8List> _column_49(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'encryption_nonce',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
    );

class Shape3 extends i0.VersionedTable {
  Shape3({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get senderId =>
      columnsByName['sender_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get content =>
      columnsByName['content']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get mediaId =>
      columnsByName['media_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<bool> get mediaStored =>
      columnsByName['media_stored']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get mediaReopened =>
      columnsByName['media_reopened']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<i2.Uint8List> get downloadToken =>
      columnsByName['download_token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<String> get quotesMessageId =>
      columnsByName['quotes_message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<bool> get isDeletedFromSender =>
      columnsByName['is_deleted_from_sender']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<DateTime> get openedAt =>
      columnsByName['opened_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get openedByAll =>
      columnsByName['opened_by_all']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get modifiedAt =>
      columnsByName['modified_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get ackByUser =>
      columnsByName['ack_by_user']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get ackByServer =>
      columnsByName['ack_by_server']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<String> _column_50(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'group_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES "groups" (group_id) ON DELETE CASCADE',
      ),
    );
i1.GeneratedColumn<String> _column_51(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'message_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<int> _column_52(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'sender_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES contacts (user_id)',
      ),
    );
i1.GeneratedColumn<String> _column_53(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'content',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<String> _column_54(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'media_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES media_files (media_id) ON DELETE SET NULL',
      ),
    );
i1.GeneratedColumn<bool> _column_55(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'),
    );
i1.GeneratedColumn<bool> _column_56(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'media_reopened',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("media_reopened" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<String> _column_57(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'quotes_message_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<bool> _column_58(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'is_deleted_from_sender',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("is_deleted_from_sender" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<DateTime> _column_59(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'opened_at',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<DateTime> _column_60(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'opened_by_all',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<DateTime> _column_61(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'modified_at',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<DateTime> _column_62(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'ack_by_user',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<DateTime> _column_63(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'ack_by_server',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );

class Shape4 extends i0.VersionedTable {
  Shape4({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get id =>
      columnsByName['id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get content =>
      columnsByName['content']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_64(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'id',
      aliasedName,
      false,
      hasAutoIncrement: true,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'PRIMARY KEY AUTOINCREMENT',
      ),
    );
i1.GeneratedColumn<String> _column_65(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'message_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES messages (message_id) ON DELETE CASCADE',
      ),
    );
i1.GeneratedColumn<int> _column_66(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'contact_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
    );

class Shape5 extends i0.VersionedTable {
  Shape5({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get emoji =>
      columnsByName['emoji']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get senderId =>
      columnsByName['sender_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<String> _column_67(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'emoji',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<int> _column_68(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'sender_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES contacts (user_id) ON DELETE CASCADE',
      ),
    );

class Shape6 extends i0.VersionedTable {
  Shape6({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get memberState =>
      columnsByName['member_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get groupPublicKey =>
      columnsByName['group_public_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get lastMessage =>
      columnsByName['last_message']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_69(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'contact_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES contacts (user_id)',
      ),
    );
i1.GeneratedColumn<String> _column_70(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'member_state',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<i2.Uint8List> _column_71(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'group_public_key',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<DateTime> _column_72(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'last_message',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );

class Shape7 extends i0.VersionedTable {
  Shape7({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get receiptId =>
      columnsByName['receipt_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get message =>
      columnsByName['message']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<bool> get contactWillSendsReceipt =>
      columnsByName['contact_will_sends_receipt']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<DateTime> get ackByServerAt =>
      columnsByName['ack_by_server_at']! as i1.GeneratedColumn<DateTime>;
  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 createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<String> _column_73(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'receipt_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<int> _column_74(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<String> _column_75(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'message_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES messages (message_id) ON DELETE CASCADE',
      ),
    );
i1.GeneratedColumn<i2.Uint8List> _column_76(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'message',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<bool> _column_77(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'contact_will_sends_receipt',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("contact_will_sends_receipt" IN (0, 1))',
      ),
      defaultValue: const CustomExpression('1'),
    );
i1.GeneratedColumn<DateTime> _column_78(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'ack_by_server_at',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<int> _column_79(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'retry_count',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const CustomExpression('0'),
    );
i1.GeneratedColumn<DateTime> _column_80(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'last_retry',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );

class Shape8 extends i0.VersionedTable {
  Shape8({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get receiptId =>
      columnsByName['receipt_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

class Shape9 extends i0.VersionedTable {
  Shape9({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_81(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'device_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<String> _column_82(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'name',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<i2.Uint8List> _column_83(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'identity_key',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
    );

class Shape10 extends i0.VersionedTable {
  Shape10({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_84(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'pre_key_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<i2.Uint8List> _column_85(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'pre_key',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
    );

class Shape11 extends i0.VersionedTable {
  Shape11({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_86(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'sender_key_name',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<i2.Uint8List> _column_87(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'sender_key',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
    );

class Shape12 extends i0.VersionedTable {
  Shape12({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_88(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'session_record',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
    );

class Shape13 extends i0.VersionedTable {
  Shape13({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>;
}

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 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_89(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'signed_pre_key_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<i2.Uint8List> _column_90(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'signed_pre_key',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<i2.Uint8List> _column_91(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'signed_pre_key_signature',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
    );

class Shape15 extends i0.VersionedTable {
  Shape15({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<DateTime> get actionAt =>
      columnsByName['action_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_92(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'contact_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<DateTime> _column_93(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'action_at',
      aliasedName,
      false,
      type: i1.DriftSqlType.dateTime,
      defaultValue: const CustomExpression(
        'CAST(strftime(\'%s\', CURRENT_TIMESTAMP) AS INTEGER)',
      ),
    );

class Shape16 extends i0.VersionedTable {
  Shape16({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get groupHistoryId =>
      columnsByName['group_history_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get affectedContactId =>
      columnsByName['affected_contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get oldGroupName =>
      columnsByName['old_group_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get newGroupName =>
      columnsByName['new_group_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get newDeleteMessagesAfterMilliseconds =>
      columnsByName['new_delete_messages_after_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<DateTime> get actionAt =>
      columnsByName['action_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<String> _column_94(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'group_history_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<int> _column_95(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'contact_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES contacts (user_id)',
      ),
    );
i1.GeneratedColumn<int> _column_96(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'affected_contact_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES contacts (user_id)',
      ),
    );
i1.GeneratedColumn<String> _column_97(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'old_group_name',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<String> _column_98(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'new_group_name',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<int> _column_99(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'new_delete_messages_after_milliseconds',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
    );

final class Schema3 extends i0.VersionedSchema {
  Schema3({required super.database}) : super(version: 3);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageActions,
    groupHistories,
  ];
  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,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape17 groups = Shape17(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_13,
        _column_14,
        _column_15,
        _column_16,
        _column_17,
        _column_18,
        _column_19,
        _column_20,
        _column_21,
        _column_22,
        _column_23,
        _column_24,
        _column_100,
        _column_25,
        _column_26,
        _column_27,
        _column_12,
        _column_28,
        _column_29,
        _column_30,
        _column_31,
        _column_32,
        _column_33,
        _column_34,
        _column_35,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape2 mediaFiles = Shape2(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_36,
        _column_37,
        _column_38,
        _column_39,
        _column_40,
        _column_41,
        _column_42,
        _column_43,
        _column_44,
        _column_45,
        _column_46,
        _column_47,
        _column_48,
        _column_49,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape3 messages = Shape3(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_50,
        _column_51,
        _column_52,
        _column_37,
        _column_53,
        _column_54,
        _column_55,
        _column_56,
        _column_46,
        _column_57,
        _column_58,
        _column_59,
        _column_60,
        _column_12,
        _column_61,
        _column_62,
        _column_63,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape4 messageHistories = Shape4(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(id)'],
      columns: [_column_64, _column_65, _column_66, _column_53, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape5 reactions = Shape5(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_65, _column_67, _column_68, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape6 groupMembers = Shape6(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_50,
        _column_69,
        _column_70,
        _column_71,
        _column_72,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape7 receipts = Shape7(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_73,
        _column_74,
        _column_75,
        _column_76,
        _column_77,
        _column_78,
        _column_79,
        _column_80,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape8 receivedReceipts = Shape8(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_73, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape9 signalIdentityKeyStores = Shape9(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_83, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape10 signalPreKeyStores = Shape10(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_84, _column_85, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_86, _column_87],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape12 signalSessionStores = Shape12(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_88, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape13 signalContactPreKeys = Shape13(
    source: i0.VersionedTable(
      entityName: 'signal_contact_pre_keys',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id, pre_key_id)'],
      columns: [_column_74, _column_84, _column_85, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape14 signalContactSignedPreKeys = Shape14(
    source: i0.VersionedTable(
      entityName: 'signal_contact_signed_pre_keys',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id)'],
      columns: [_column_74, _column_89, _column_90, _column_91, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape15 messageActions = Shape15(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_65, _column_92, _column_37, _column_93],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape16 groupHistories = Shape16(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_94,
        _column_50,
        _column_95,
        _column_96,
        _column_97,
        _column_98,
        _column_99,
        _column_37,
        _column_93,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape17 extends i0.VersionedTable {
  Shape17({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<bool> get isGroupAdmin =>
      columnsByName['is_group_admin']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get isDirectChat =>
      columnsByName['is_direct_chat']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get pinned =>
      columnsByName['pinned']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get archived =>
      columnsByName['archived']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get joinedGroup =>
      columnsByName['joined_group']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get leftGroup =>
      columnsByName['left_group']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get deletedContent =>
      columnsByName['deleted_content']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get stateVersionId =>
      columnsByName['state_version_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get stateEncryptionKey =>
      columnsByName['state_encryption_key']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get myGroupPrivateKey =>
      columnsByName['my_group_private_key']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<String> get groupName =>
      columnsByName['group_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get draftMessage =>
      columnsByName['draft_message']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get totalMediaCounter =>
      columnsByName['total_media_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get alsoBestFriend =>
      columnsByName['also_best_friend']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get deleteMessagesAfterMilliseconds =>
      columnsByName['delete_messages_after_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
  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<int> get flameCounter =>
      columnsByName['flame_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get maxFlameCounter =>
      columnsByName['max_flame_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get maxFlameCounterFrom =>
      columnsByName['max_flame_counter_from']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessageExchange =>
      columnsByName['last_message_exchange']! as i1.GeneratedColumn<DateTime>;
}

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

final class Schema4 extends i0.VersionedSchema {
  Schema4({required super.database}) : super(version: 4);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageActions,
    groupHistories,
  ];
  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,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape17 groups = Shape17(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_13,
        _column_14,
        _column_15,
        _column_16,
        _column_17,
        _column_18,
        _column_19,
        _column_20,
        _column_21,
        _column_22,
        _column_23,
        _column_24,
        _column_100,
        _column_25,
        _column_26,
        _column_27,
        _column_12,
        _column_28,
        _column_29,
        _column_30,
        _column_31,
        _column_32,
        _column_33,
        _column_34,
        _column_35,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape2 mediaFiles = Shape2(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_36,
        _column_37,
        _column_38,
        _column_39,
        _column_40,
        _column_41,
        _column_42,
        _column_43,
        _column_44,
        _column_45,
        _column_46,
        _column_47,
        _column_48,
        _column_49,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape3 messages = Shape3(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_50,
        _column_51,
        _column_52,
        _column_37,
        _column_53,
        _column_54,
        _column_55,
        _column_56,
        _column_46,
        _column_57,
        _column_58,
        _column_59,
        _column_60,
        _column_12,
        _column_61,
        _column_62,
        _column_63,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape4 messageHistories = Shape4(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(id)'],
      columns: [_column_64, _column_65, _column_66, _column_53, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape5 reactions = Shape5(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_65, _column_67, _column_68, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape6 groupMembers = Shape6(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_50,
        _column_69,
        _column_70,
        _column_71,
        _column_72,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape7 receipts = Shape7(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_73,
        _column_74,
        _column_75,
        _column_76,
        _column_77,
        _column_78,
        _column_79,
        _column_80,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape8 receivedReceipts = Shape8(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_73, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape9 signalIdentityKeyStores = Shape9(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_83, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape10 signalPreKeyStores = Shape10(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_84, _column_85, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_86, _column_87],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape12 signalSessionStores = Shape12(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_88, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape13 signalContactPreKeys = Shape13(
    source: i0.VersionedTable(
      entityName: 'signal_contact_pre_keys',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id, pre_key_id)'],
      columns: [_column_74, _column_84, _column_85, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape14 signalContactSignedPreKeys = Shape14(
    source: i0.VersionedTable(
      entityName: 'signal_contact_signed_pre_keys',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id)'],
      columns: [_column_74, _column_89, _column_90, _column_91, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape15 messageActions = Shape15(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_65, _column_92, _column_37, _column_93],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape16 groupHistories = Shape16(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_94,
        _column_50,
        _column_95,
        _column_101,
        _column_97,
        _column_98,
        _column_99,
        _column_37,
        _column_93,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

i1.GeneratedColumn<int> _column_101(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'affected_contact_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
    );

final class Schema5 extends i0.VersionedSchema {
  Schema5({required super.database}) : super(version: 5);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageActions,
    groupHistories,
  ];
  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,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape17 groups = Shape17(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_13,
        _column_14,
        _column_15,
        _column_16,
        _column_17,
        _column_18,
        _column_19,
        _column_20,
        _column_21,
        _column_22,
        _column_23,
        _column_24,
        _column_100,
        _column_25,
        _column_26,
        _column_27,
        _column_12,
        _column_28,
        _column_29,
        _column_30,
        _column_31,
        _column_32,
        _column_33,
        _column_34,
        _column_35,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape18 mediaFiles = Shape18(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_36,
        _column_37,
        _column_38,
        _column_39,
        _column_40,
        _column_41,
        _column_42,
        _column_43,
        _column_44,
        _column_45,
        _column_46,
        _column_47,
        _column_48,
        _column_49,
        _column_102,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape3 messages = Shape3(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_50,
        _column_51,
        _column_52,
        _column_37,
        _column_53,
        _column_54,
        _column_55,
        _column_56,
        _column_46,
        _column_57,
        _column_58,
        _column_59,
        _column_60,
        _column_12,
        _column_61,
        _column_62,
        _column_63,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape4 messageHistories = Shape4(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(id)'],
      columns: [_column_64, _column_65, _column_66, _column_53, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape5 reactions = Shape5(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_65, _column_67, _column_68, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape6 groupMembers = Shape6(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_50,
        _column_69,
        _column_70,
        _column_71,
        _column_72,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape19 receipts = Shape19(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_73,
        _column_74,
        _column_75,
        _column_76,
        _column_77,
        _column_103,
        _column_78,
        _column_79,
        _column_80,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape8 receivedReceipts = Shape8(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_73, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape9 signalIdentityKeyStores = Shape9(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_83, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape10 signalPreKeyStores = Shape10(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_84, _column_85, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_86, _column_87],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape12 signalSessionStores = Shape12(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_88, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape13 signalContactPreKeys = Shape13(
    source: i0.VersionedTable(
      entityName: 'signal_contact_pre_keys',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id, pre_key_id)'],
      columns: [_column_74, _column_84, _column_85, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape14 signalContactSignedPreKeys = Shape14(
    source: i0.VersionedTable(
      entityName: 'signal_contact_signed_pre_keys',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id)'],
      columns: [_column_74, _column_89, _column_90, _column_91, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape15 messageActions = Shape15(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_65, _column_92, _column_37, _column_93],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape16 groupHistories = Shape16(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_94,
        _column_50,
        _column_95,
        _column_101,
        _column_97,
        _column_98,
        _column_99,
        _column_37,
        _column_93,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape18 extends i0.VersionedTable {
  Shape18({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get mediaId =>
      columnsByName['media_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get uploadState =>
      columnsByName['upload_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get downloadState =>
      columnsByName['download_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<bool> get requiresAuthentication =>
      columnsByName['requires_authentication']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get stored =>
      columnsByName['stored']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get isDraftMedia =>
      columnsByName['is_draft_media']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<String> get reuploadRequestedBy =>
      columnsByName['reupload_requested_by']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get displayLimitInMilliseconds =>
      columnsByName['display_limit_in_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get removeAudio =>
      columnsByName['remove_audio']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<i2.Uint8List> get downloadToken =>
      columnsByName['download_token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionKey =>
      columnsByName['encryption_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionMac =>
      columnsByName['encryption_mac']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionNonce =>
      columnsByName['encryption_nonce']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get storedFileHash =>
      columnsByName['stored_file_hash']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

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

class Shape19 extends i0.VersionedTable {
  Shape19({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get receiptId =>
      columnsByName['receipt_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get message =>
      columnsByName['message']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<bool> get contactWillSendsReceipt =>
      columnsByName['contact_will_sends_receipt']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<DateTime> get markForRetry =>
      columnsByName['mark_for_retry']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get ackByServerAt =>
      columnsByName['ack_by_server_at']! as i1.GeneratedColumn<DateTime>;
  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 createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<DateTime> _column_103(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'mark_for_retry',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );

final class Schema6 extends i0.VersionedSchema {
  Schema6({required super.database}) : super(version: 6);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageActions,
    groupHistories,
  ];
  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,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape17 groups = Shape17(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_13,
        _column_14,
        _column_15,
        _column_16,
        _column_17,
        _column_18,
        _column_19,
        _column_20,
        _column_21,
        _column_22,
        _column_23,
        _column_24,
        _column_100,
        _column_25,
        _column_26,
        _column_27,
        _column_12,
        _column_28,
        _column_29,
        _column_30,
        _column_31,
        _column_32,
        _column_33,
        _column_34,
        _column_35,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape18 mediaFiles = Shape18(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_36,
        _column_37,
        _column_38,
        _column_39,
        _column_40,
        _column_41,
        _column_42,
        _column_43,
        _column_44,
        _column_45,
        _column_46,
        _column_47,
        _column_48,
        _column_49,
        _column_102,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape3 messages = Shape3(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_50,
        _column_51,
        _column_52,
        _column_37,
        _column_53,
        _column_54,
        _column_55,
        _column_56,
        _column_46,
        _column_57,
        _column_58,
        _column_59,
        _column_60,
        _column_12,
        _column_61,
        _column_62,
        _column_63,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape4 messageHistories = Shape4(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(id)'],
      columns: [_column_64, _column_65, _column_66, _column_53, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape5 reactions = Shape5(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_65, _column_67, _column_68, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape6 groupMembers = Shape6(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_50,
        _column_69,
        _column_70,
        _column_71,
        _column_72,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape20 receipts = Shape20(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_73,
        _column_74,
        _column_75,
        _column_76,
        _column_77,
        _column_103,
        _column_104,
        _column_78,
        _column_79,
        _column_80,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape8 receivedReceipts = Shape8(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_73, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape9 signalIdentityKeyStores = Shape9(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_83, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape10 signalPreKeyStores = Shape10(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_84, _column_85, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_86, _column_87],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape12 signalSessionStores = Shape12(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_88, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape13 signalContactPreKeys = Shape13(
    source: i0.VersionedTable(
      entityName: 'signal_contact_pre_keys',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id, pre_key_id)'],
      columns: [_column_74, _column_84, _column_85, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape14 signalContactSignedPreKeys = Shape14(
    source: i0.VersionedTable(
      entityName: 'signal_contact_signed_pre_keys',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id)'],
      columns: [_column_74, _column_89, _column_90, _column_91, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape15 messageActions = Shape15(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_65, _column_92, _column_37, _column_93],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape16 groupHistories = Shape16(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_94,
        _column_50,
        _column_95,
        _column_101,
        _column_97,
        _column_98,
        _column_99,
        _column_37,
        _column_93,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape20 extends i0.VersionedTable {
  Shape20({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get receiptId =>
      columnsByName['receipt_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get message =>
      columnsByName['message']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<bool> get contactWillSendsReceipt =>
      columnsByName['contact_will_sends_receipt']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<DateTime> get markForRetry =>
      columnsByName['mark_for_retry']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get markForRetryAfterAccepted =>
      columnsByName['mark_for_retry_after_accepted']!
          as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get ackByServerAt =>
      columnsByName['ack_by_server_at']! as i1.GeneratedColumn<DateTime>;
  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 createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<DateTime> _column_104(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'mark_for_retry_after_accepted',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );

final class Schema7 extends i0.VersionedSchema {
  Schema7({required super.database}) : super(version: 7);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalContactPreKeys,
    signalContactSignedPreKeys,
    messageActions,
    groupHistories,
  ];
  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,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape17 groups = Shape17(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_13,
        _column_14,
        _column_15,
        _column_16,
        _column_17,
        _column_18,
        _column_19,
        _column_20,
        _column_21,
        _column_22,
        _column_23,
        _column_24,
        _column_100,
        _column_25,
        _column_26,
        _column_27,
        _column_12,
        _column_28,
        _column_29,
        _column_30,
        _column_31,
        _column_32,
        _column_33,
        _column_34,
        _column_35,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape18 mediaFiles = Shape18(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_36,
        _column_37,
        _column_38,
        _column_39,
        _column_40,
        _column_41,
        _column_42,
        _column_43,
        _column_44,
        _column_45,
        _column_46,
        _column_47,
        _column_48,
        _column_49,
        _column_102,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape21 messages = Shape21(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_50,
        _column_51,
        _column_52,
        _column_37,
        _column_53,
        _column_54,
        _column_105,
        _column_55,
        _column_56,
        _column_46,
        _column_57,
        _column_58,
        _column_59,
        _column_60,
        _column_12,
        _column_61,
        _column_62,
        _column_63,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape4 messageHistories = Shape4(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(id)'],
      columns: [_column_64, _column_65, _column_66, _column_53, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape5 reactions = Shape5(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_65, _column_67, _column_68, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape6 groupMembers = Shape6(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_50,
        _column_69,
        _column_70,
        _column_71,
        _column_72,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape20 receipts = Shape20(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_73,
        _column_74,
        _column_75,
        _column_76,
        _column_77,
        _column_103,
        _column_104,
        _column_78,
        _column_79,
        _column_80,
        _column_12,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape8 receivedReceipts = Shape8(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_73, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape9 signalIdentityKeyStores = Shape9(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_83, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape10 signalPreKeyStores = Shape10(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_84, _column_85, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_86, _column_87],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape12 signalSessionStores = Shape12(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_88, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape13 signalContactPreKeys = Shape13(
    source: i0.VersionedTable(
      entityName: 'signal_contact_pre_keys',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id, pre_key_id)'],
      columns: [_column_74, _column_84, _column_85, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape14 signalContactSignedPreKeys = Shape14(
    source: i0.VersionedTable(
      entityName: 'signal_contact_signed_pre_keys',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id)'],
      columns: [_column_74, _column_89, _column_90, _column_91, _column_12],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape15 messageActions = Shape15(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_65, _column_92, _column_37, _column_93],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape16 groupHistories = Shape16(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_94,
        _column_50,
        _column_95,
        _column_101,
        _column_97,
        _column_98,
        _column_99,
        _column_37,
        _column_93,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape21 extends i0.VersionedTable {
  Shape21({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get senderId =>
      columnsByName['sender_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get content =>
      columnsByName['content']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get mediaId =>
      columnsByName['media_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get additionalMessageData =>
      columnsByName['additional_message_data']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<bool> get mediaStored =>
      columnsByName['media_stored']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get mediaReopened =>
      columnsByName['media_reopened']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<i2.Uint8List> get downloadToken =>
      columnsByName['download_token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<String> get quotesMessageId =>
      columnsByName['quotes_message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<bool> get isDeletedFromSender =>
      columnsByName['is_deleted_from_sender']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<DateTime> get openedAt =>
      columnsByName['opened_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get openedByAll =>
      columnsByName['opened_by_all']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get modifiedAt =>
      columnsByName['modified_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get ackByUser =>
      columnsByName['ack_by_user']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get ackByServer =>
      columnsByName['ack_by_server']! as i1.GeneratedColumn<DateTime>;
}

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

final class Schema8 extends i0.VersionedSchema {
  Schema8({required super.database}) : super(version: 8);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    messageActions,
    groupHistories,
  ];
  late final Shape22 contacts = Shape22(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape24 mediaFiles = Shape24(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape28 groupMembers = Shape28(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape29 receipts = Shape29(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape22 extends i0.VersionedTable {
  Shape22({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<i2.Uint8List> get avatarSvgCompressed =>
      columnsByName['avatar_svg_compressed']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get senderProfileCounter =>
      columnsByName['sender_profile_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get deletedByUser =>
      columnsByName['deleted_by_user']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get requested =>
      columnsByName['requested']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get blocked =>
      columnsByName['blocked']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get verified =>
      columnsByName['verified']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get accountDeleted =>
      columnsByName['account_deleted']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_106(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'user_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<String> _column_107(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'username',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<String> _column_108(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'display_name',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<String> _column_109(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'nick_name',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_110(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'avatar_svg_compressed',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_111(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'sender_profile_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_112(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'accepted',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (accepted IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_113(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'deleted_by_user',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL DEFAULT 0 CHECK (deleted_by_user IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_114(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'requested',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (requested IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_115(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'blocked',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (blocked IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_116(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'verified',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (verified IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_117(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'account_deleted',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL DEFAULT 0 CHECK (account_deleted IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_118(
  String aliasedName,
) => i1.GeneratedColumn<int>(
  'created_at',
  aliasedName,
  false,
  type: i1.DriftSqlType.int,
  $customConstraints:
      'NOT NULL DEFAULT (CAST(strftime(\'%s\', CURRENT_TIMESTAMP) AS INTEGER))',
  defaultValue: const i1.CustomExpression(
    'CAST(strftime(\'%s\', CURRENT_TIMESTAMP) AS INTEGER)',
  ),
);

class Shape23 extends i0.VersionedTable {
  Shape23({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get isGroupAdmin =>
      columnsByName['is_group_admin']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get isDirectChat =>
      columnsByName['is_direct_chat']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get pinned =>
      columnsByName['pinned']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get archived =>
      columnsByName['archived']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get joinedGroup =>
      columnsByName['joined_group']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get leftGroup =>
      columnsByName['left_group']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get deletedContent =>
      columnsByName['deleted_content']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get stateVersionId =>
      columnsByName['state_version_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get stateEncryptionKey =>
      columnsByName['state_encryption_key']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get myGroupPrivateKey =>
      columnsByName['my_group_private_key']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<String> get groupName =>
      columnsByName['group_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get draftMessage =>
      columnsByName['draft_message']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get totalMediaCounter =>
      columnsByName['total_media_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get alsoBestFriend =>
      columnsByName['also_best_friend']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get deleteMessagesAfterMilliseconds =>
      columnsByName['delete_messages_after_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get lastMessageSend =>
      columnsByName['last_message_send']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get lastMessageReceived =>
      columnsByName['last_message_received']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get lastFlameCounterChange =>
      columnsByName['last_flame_counter_change']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get lastFlameSync =>
      columnsByName['last_flame_sync']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get flameCounter =>
      columnsByName['flame_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get maxFlameCounter =>
      columnsByName['max_flame_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get maxFlameCounterFrom =>
      columnsByName['max_flame_counter_from']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get lastMessageExchange =>
      columnsByName['last_message_exchange']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<String> _column_119(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'group_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<int> _column_120(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'is_group_admin',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_group_admin IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_121(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'is_direct_chat',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_direct_chat IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_122(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'pinned',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (pinned IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_123(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'archived',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (archived IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_124(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'joined_group',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (joined_group IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_125(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'left_group',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (left_group IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_126(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'deleted_content',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL DEFAULT 0 CHECK (deleted_content IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_127(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'state_version_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<i2.Uint8List> _column_128(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'state_encryption_key',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_129(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'my_group_private_key',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<String> _column_130(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'group_name',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<String> _column_131(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'draft_message',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_132(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'total_media_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_133(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'also_best_friend',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL DEFAULT 0 CHECK (also_best_friend IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_134(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'delete_messages_after_milliseconds',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 86400000',
      defaultValue: const i1.CustomExpression('86400000'),
    );
i1.GeneratedColumn<int> _column_135(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'last_message_send',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_136(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'last_message_received',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_137(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'last_flame_counter_change',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_138(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'last_flame_sync',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_139(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'flame_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_140(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'max_flame_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_141(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'max_flame_counter_from',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_142(
  String aliasedName,
) => i1.GeneratedColumn<int>(
  'last_message_exchange',
  aliasedName,
  false,
  type: i1.DriftSqlType.int,
  $customConstraints:
      'NOT NULL DEFAULT (CAST(strftime(\'%s\', CURRENT_TIMESTAMP) AS INTEGER))',
  defaultValue: const i1.CustomExpression(
    'CAST(strftime(\'%s\', CURRENT_TIMESTAMP) AS INTEGER)',
  ),
);

class Shape24 extends i0.VersionedTable {
  Shape24({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get mediaId =>
      columnsByName['media_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get uploadState =>
      columnsByName['upload_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get downloadState =>
      columnsByName['download_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get requiresAuthentication =>
      columnsByName['requires_authentication']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get stored =>
      columnsByName['stored']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get isDraftMedia =>
      columnsByName['is_draft_media']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get reuploadRequestedBy =>
      columnsByName['reupload_requested_by']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get displayLimitInMilliseconds =>
      columnsByName['display_limit_in_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get removeAudio =>
      columnsByName['remove_audio']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get downloadToken =>
      columnsByName['download_token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionKey =>
      columnsByName['encryption_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionMac =>
      columnsByName['encryption_mac']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionNonce =>
      columnsByName['encryption_nonce']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get storedFileHash =>
      columnsByName['stored_file_hash']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<String> _column_143(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'media_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<String> _column_144(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'type',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<String> _column_145(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'upload_state',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<String> _column_146(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'download_state',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_147(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'requires_authentication',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL DEFAULT 0 CHECK (requires_authentication IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_148(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'stored',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK ("stored" IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_149(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'is_draft_media',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_draft_media IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<String> _column_150(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'reupload_requested_by',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_151(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'display_limit_in_milliseconds',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_152(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'remove_audio',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL CHECK (remove_audio IN (0, 1))',
    );
i1.GeneratedColumn<i2.Uint8List> _column_153(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'download_token',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_154(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'encryption_key',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_155(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'encryption_mac',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_156(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'encryption_nonce',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_157(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'stored_file_hash',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );

class Shape25 extends i0.VersionedTable {
  Shape25({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get senderId =>
      columnsByName['sender_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get content =>
      columnsByName['content']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get mediaId =>
      columnsByName['media_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get additionalMessageData =>
      columnsByName['additional_message_data']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get mediaStored =>
      columnsByName['media_stored']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaReopened =>
      columnsByName['media_reopened']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get downloadToken =>
      columnsByName['download_token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<String> get quotesMessageId =>
      columnsByName['quotes_message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get isDeletedFromSender =>
      columnsByName['is_deleted_from_sender']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get openedAt =>
      columnsByName['opened_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get openedByAll =>
      columnsByName['opened_by_all']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get modifiedAt =>
      columnsByName['modified_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get ackByUser =>
      columnsByName['ack_by_user']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get ackByServer =>
      columnsByName['ack_by_server']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<String> _column_158(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'group_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints:
          'NOT NULL REFERENCES "groups"(group_id)ON DELETE CASCADE',
    );
i1.GeneratedColumn<String> _column_159(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'message_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<int> _column_160(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'sender_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL REFERENCES contacts(user_id)',
    );
i1.GeneratedColumn<String> _column_161(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'content',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<String> _column_162(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'media_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints:
          'NULL REFERENCES media_files(media_id)ON DELETE SET NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_163(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'additional_message_data',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_164(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'media_stored',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (media_stored IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_165(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'media_reopened',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (media_reopened IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<String> _column_166(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'quotes_message_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_167(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'is_deleted_from_sender',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL DEFAULT 0 CHECK (is_deleted_from_sender IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_168(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'opened_at',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_169(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'opened_by_all',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_170(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'modified_at',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_171(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'ack_by_user',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_172(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'ack_by_server',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );

class Shape26 extends i0.VersionedTable {
  Shape26({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get id =>
      columnsByName['id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get content =>
      columnsByName['content']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_173(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'id',
      aliasedName,
      false,
      hasAutoIncrement: true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL PRIMARY KEY AUTOINCREMENT',
    );
i1.GeneratedColumn<String> _column_174(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'message_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints:
          'NOT NULL REFERENCES messages(message_id)ON DELETE CASCADE',
    );
i1.GeneratedColumn<int> _column_175(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'contact_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL REFERENCES contacts(user_id)ON DELETE CASCADE',
    );

class Shape27 extends i0.VersionedTable {
  Shape27({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get emoji =>
      columnsByName['emoji']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get senderId =>
      columnsByName['sender_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<String> _column_176(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'emoji',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<int> _column_177(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'sender_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL REFERENCES contacts(user_id)ON DELETE CASCADE',
    );

class Shape28 extends i0.VersionedTable {
  Shape28({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get memberState =>
      columnsByName['member_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get groupPublicKey =>
      columnsByName['group_public_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get lastMessage =>
      columnsByName['last_message']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_178(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'contact_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL REFERENCES contacts(user_id)',
    );
i1.GeneratedColumn<String> _column_179(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'member_state',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_180(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'group_public_key',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_181(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'last_message',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );

class Shape29 extends i0.VersionedTable {
  Shape29({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get receiptId =>
      columnsByName['receipt_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get message =>
      columnsByName['message']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get contactWillSendsReceipt =>
      columnsByName['contact_will_sends_receipt']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get markForRetry =>
      columnsByName['mark_for_retry']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get markForRetryAfterAccepted =>
      columnsByName['mark_for_retry_after_accepted']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get ackByServerAt =>
      columnsByName['ack_by_server_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get retryCount =>
      columnsByName['retry_count']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get lastRetry =>
      columnsByName['last_retry']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<String> _column_182(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'receipt_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<int> _column_183(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'contact_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL REFERENCES contacts(user_id)ON DELETE CASCADE',
    );
i1.GeneratedColumn<String> _column_184(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'message_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints:
          'NULL REFERENCES messages(message_id)ON DELETE CASCADE',
    );
i1.GeneratedColumn<i2.Uint8List> _column_185(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'message',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<int> _column_186(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'contact_will_sends_receipt',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL DEFAULT 1 CHECK (contact_will_sends_receipt IN (0, 1))',
      defaultValue: const i1.CustomExpression('1'),
    );
i1.GeneratedColumn<int> _column_187(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'mark_for_retry',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_188(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'mark_for_retry_after_accepted',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_189(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'ack_by_server_at',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_190(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'retry_count',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_191(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'last_retry',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );

class Shape30 extends i0.VersionedTable {
  Shape30({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get receiptId =>
      columnsByName['receipt_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

class Shape31 extends i0.VersionedTable {
  Shape31({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<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_192(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'device_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<String> _column_193(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'name',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_194(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'identity_key',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NOT NULL',
    );

class Shape32 extends i0.VersionedTable {
  Shape32({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<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_195(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'pre_key_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_196(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'pre_key',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<String> _column_197(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'sender_key_name',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_198(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'sender_key',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NOT NULL',
    );

class Shape33 extends i0.VersionedTable {
  Shape33({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<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<i2.Uint8List> _column_199(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'session_record',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NOT NULL',
    );

class Shape34 extends i0.VersionedTable {
  Shape34({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get actionAt =>
      columnsByName['action_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_200(
  String aliasedName,
) => i1.GeneratedColumn<int>(
  'action_at',
  aliasedName,
  false,
  type: i1.DriftSqlType.int,
  $customConstraints:
      'NOT NULL DEFAULT (CAST(strftime(\'%s\', CURRENT_TIMESTAMP) AS INTEGER))',
  defaultValue: const i1.CustomExpression(
    'CAST(strftime(\'%s\', CURRENT_TIMESTAMP) AS INTEGER)',
  ),
);

class Shape35 extends i0.VersionedTable {
  Shape35({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get groupHistoryId =>
      columnsByName['group_history_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get affectedContactId =>
      columnsByName['affected_contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get oldGroupName =>
      columnsByName['old_group_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get newGroupName =>
      columnsByName['new_group_name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get newDeleteMessagesAfterMilliseconds =>
      columnsByName['new_delete_messages_after_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get actionAt =>
      columnsByName['action_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<String> _column_201(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'group_history_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<int> _column_202(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'contact_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL REFERENCES contacts(user_id)',
    );
i1.GeneratedColumn<int> _column_203(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'affected_contact_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<String> _column_204(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'old_group_name',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<String> _column_205(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'new_group_name',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_206(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'new_delete_messages_after_milliseconds',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );

final class Schema9 extends i0.VersionedSchema {
  Schema9({required super.database}) : super(version: 9);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    messageActions,
    groupHistories,
  ];
  late final Shape22 contacts = Shape22(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape36 mediaFiles = Shape36(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape28 groupMembers = Shape28(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape29 receipts = Shape29(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape36 extends i0.VersionedTable {
  Shape36({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get mediaId =>
      columnsByName['media_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get uploadState =>
      columnsByName['upload_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get downloadState =>
      columnsByName['download_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get requiresAuthentication =>
      columnsByName['requires_authentication']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get stored =>
      columnsByName['stored']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get isDraftMedia =>
      columnsByName['is_draft_media']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get preProgressingProcess =>
      columnsByName['pre_progressing_process']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get reuploadRequestedBy =>
      columnsByName['reupload_requested_by']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get displayLimitInMilliseconds =>
      columnsByName['display_limit_in_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get removeAudio =>
      columnsByName['remove_audio']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get downloadToken =>
      columnsByName['download_token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionKey =>
      columnsByName['encryption_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionMac =>
      columnsByName['encryption_mac']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionNonce =>
      columnsByName['encryption_nonce']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get storedFileHash =>
      columnsByName['stored_file_hash']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_207(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'pre_progressing_process',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );

final class Schema10 extends i0.VersionedSchema {
  Schema10({required super.database}) : super(version: 10);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    messageActions,
    groupHistories,
  ];
  late final Shape22 contacts = Shape22(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape36 mediaFiles = Shape36(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape28 groupMembers = Shape28(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape37 extends i0.VersionedTable {
  Shape37({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get receiptId =>
      columnsByName['receipt_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get message =>
      columnsByName['message']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get contactWillSendsReceipt =>
      columnsByName['contact_will_sends_receipt']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get willBeRetriedByMediaUpload =>
      columnsByName['will_be_retried_by_media_upload']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get markForRetry =>
      columnsByName['mark_for_retry']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get markForRetryAfterAccepted =>
      columnsByName['mark_for_retry_after_accepted']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get ackByServerAt =>
      columnsByName['ack_by_server_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get retryCount =>
      columnsByName['retry_count']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get lastRetry =>
      columnsByName['last_retry']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_208(
  String aliasedName,
) => i1.GeneratedColumn<int>(
  'will_be_retried_by_media_upload',
  aliasedName,
  false,
  type: i1.DriftSqlType.int,
  $customConstraints:
      'NOT NULL DEFAULT 0 CHECK (will_be_retried_by_media_upload IN (0, 1))',
  defaultValue: const i1.CustomExpression('0'),
);

final class Schema11 extends i0.VersionedSchema {
  Schema11({required super.database}) : super(version: 11);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    messageActions,
    groupHistories,
  ];
  late final Shape22 contacts = Shape22(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape36 mediaFiles = Shape36(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape38 extends i0.VersionedTable {
  Shape38({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get memberState =>
      columnsByName['member_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get groupPublicKey =>
      columnsByName['group_public_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get lastChatOpened =>
      columnsByName['last_chat_opened']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get lastTypeIndicator =>
      columnsByName['last_type_indicator']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get lastMessage =>
      columnsByName['last_message']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_209(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'last_chat_opened',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_210(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'last_type_indicator',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );

final class Schema12 extends i0.VersionedSchema {
  Schema12({required super.database}) : super(version: 12);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
  ];
  late final Shape39 contacts = Shape39(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_213,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape36 mediaFiles = Shape36(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape40 keyVerifications = Shape40(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_216, _column_183, _column_144, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape42 userDiscoveryAnnouncedUsers = Shape42(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape39 extends i0.VersionedTable {
  Shape39({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<i2.Uint8List> get avatarSvgCompressed =>
      columnsByName['avatar_svg_compressed']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get senderProfileCounter =>
      columnsByName['sender_profile_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get deletedByUser =>
      columnsByName['deleted_by_user']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get requested =>
      columnsByName['requested']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get blocked =>
      columnsByName['blocked']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get verified =>
      columnsByName['verified']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get accountDeleted =>
      columnsByName['account_deleted']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get userDiscoveryVersion =>
      columnsByName['user_discovery_version']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get userDiscoveryExcluded =>
      columnsByName['user_discovery_excluded']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get userDiscoveryManualApproved =>
      columnsByName['user_discovery_manual_approved']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaSendCounter =>
      columnsByName['media_send_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaReceivedCounter =>
      columnsByName['media_received_counter']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<i2.Uint8List> _column_211(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'user_discovery_version',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_212(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'user_discovery_excluded',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL DEFAULT 0 CHECK (user_discovery_excluded IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_213(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'user_discovery_manual_approved',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NULL DEFAULT 0 CHECK (user_discovery_manual_approved IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_214(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'media_send_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_215(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'media_received_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0',
      defaultValue: const i1.CustomExpression('0'),
    );

class Shape40 extends i0.VersionedTable {
  Shape40({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get verificationId =>
      columnsByName['verification_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_216(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'verification_id',
      aliasedName,
      false,
      hasAutoIncrement: true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL PRIMARY KEY AUTOINCREMENT',
    );

class Shape41 extends i0.VersionedTable {
  Shape41({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get tokenId =>
      columnsByName['token_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get token =>
      columnsByName['token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_217(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'token_id',
      aliasedName,
      false,
      hasAutoIncrement: true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL PRIMARY KEY AUTOINCREMENT',
    );
i1.GeneratedColumn<i2.Uint8List> _column_218(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'token',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NOT NULL',
    );

class Shape42 extends i0.VersionedTable {
  Shape42({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get announcedUserId =>
      columnsByName['announced_user_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get announcedPublicKey =>
      columnsByName['announced_public_key']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get publicId =>
      columnsByName['public_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get username =>
      columnsByName['username']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get wasShownToTheUser =>
      columnsByName['was_shown_to_the_user']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get isHidden =>
      columnsByName['is_hidden']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_219(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'announced_user_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_220(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'announced_public_key',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<int> _column_221(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'public_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL UNIQUE',
    );
i1.GeneratedColumn<String> _column_222(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'username',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_223(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'was_shown_to_the_user',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL DEFAULT 0 CHECK (was_shown_to_the_user IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_224(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'is_hidden',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_hidden IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );

class Shape43 extends i0.VersionedTable {
  Shape43({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get announcedUserId =>
      columnsByName['announced_user_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get fromContactId =>
      columnsByName['from_contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get publicKeyVerifiedTimestamp =>
      columnsByName['public_key_verified_timestamp']!
          as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_225(
  String aliasedName,
) => i1.GeneratedColumn<int>(
  'announced_user_id',
  aliasedName,
  false,
  type: i1.DriftSqlType.int,
  $customConstraints:
      'NOT NULL REFERENCES user_discovery_announced_users(announced_user_id)ON DELETE CASCADE',
);
i1.GeneratedColumn<int> _column_226(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'from_contact_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL REFERENCES contacts(user_id)ON DELETE CASCADE',
    );
i1.GeneratedColumn<int> _column_227(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'public_key_verified_timestamp',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );

class Shape44 extends i0.VersionedTable {
  Shape44({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get fromContactId =>
      columnsByName['from_contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get promotionId =>
      columnsByName['promotion_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get publicId =>
      columnsByName['public_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get threshold =>
      columnsByName['threshold']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get announcementShare =>
      columnsByName['announcement_share']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get publicKeyVerifiedTimestamp =>
      columnsByName['public_key_verified_timestamp']!
          as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_228(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'promotion_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<int> _column_229(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'public_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<int> _column_230(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'threshold',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_231(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'announcement_share',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NOT NULL',
    );

class Shape45 extends i0.VersionedTable {
  Shape45({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get versionId =>
      columnsByName['version_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get promotion =>
      columnsByName['promotion']! as i1.GeneratedColumn<i2.Uint8List>;
}

i1.GeneratedColumn<int> _column_232(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'version_id',
      aliasedName,
      false,
      hasAutoIncrement: true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL PRIMARY KEY AUTOINCREMENT',
    );
i1.GeneratedColumn<i2.Uint8List> _column_233(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'promotion',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NOT NULL',
    );

class Shape46 extends i0.VersionedTable {
  Shape46({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get shareId =>
      columnsByName['share_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get share =>
      columnsByName['share']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_234(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'share_id',
      aliasedName,
      false,
      hasAutoIncrement: true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL PRIMARY KEY AUTOINCREMENT',
    );
i1.GeneratedColumn<i2.Uint8List> _column_235(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'share',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NOT NULL',
    );

final class Schema13 extends i0.VersionedSchema {
  Schema13({required super.database}) : super(version: 13);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
  ];
  late final Shape39 contacts = Shape39(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_213,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape36 mediaFiles = Shape36(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape40 keyVerifications = Shape40(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_216, _column_183, _column_144, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape42 userDiscoveryAnnouncedUsers = Shape42(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_173, _column_236, _column_237],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_238, _column_158],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape47 extends i0.VersionedTable {
  Shape47({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get id =>
      columnsByName['id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get emoji =>
      columnsByName['emoji']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get usageCounter =>
      columnsByName['usage_counter']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<String> _column_236(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'emoji',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL UNIQUE',
    );
i1.GeneratedColumn<int> _column_237(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'usage_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0',
      defaultValue: const i1.CustomExpression('0'),
    );

class Shape48 extends i0.VersionedTable {
  Shape48({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get shortcutId =>
      columnsByName['shortcut_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
}

i1.GeneratedColumn<int> _column_238(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'shortcut_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL REFERENCES shortcuts(id)ON DELETE CASCADE',
    );

final class Schema14 extends i0.VersionedSchema {
  Schema14({required super.database}) : super(version: 14);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
  ];
  late final Shape39 contacts = Shape39(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_213,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape49 mediaFiles = Shape49(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_239,
        _column_240,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_118,
        _column_241,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape40 keyVerifications = Shape40(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_216, _column_183, _column_144, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape42 userDiscoveryAnnouncedUsers = Shape42(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_173, _column_236, _column_237],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_238, _column_158],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape49 extends i0.VersionedTable {
  Shape49({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get mediaId =>
      columnsByName['media_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get uploadState =>
      columnsByName['upload_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get downloadState =>
      columnsByName['download_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get requiresAuthentication =>
      columnsByName['requires_authentication']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get stored =>
      columnsByName['stored']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get isDraftMedia =>
      columnsByName['is_draft_media']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get isFavorite =>
      columnsByName['is_favorite']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get hasCropAnalyzed =>
      columnsByName['has_crop_analyzed']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get preProgressingProcess =>
      columnsByName['pre_progressing_process']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get reuploadRequestedBy =>
      columnsByName['reupload_requested_by']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get displayLimitInMilliseconds =>
      columnsByName['display_limit_in_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get removeAudio =>
      columnsByName['remove_audio']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get downloadToken =>
      columnsByName['download_token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionKey =>
      columnsByName['encryption_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionMac =>
      columnsByName['encryption_mac']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionNonce =>
      columnsByName['encryption_nonce']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get storedFileHash =>
      columnsByName['stored_file_hash']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get createdAtMonth =>
      columnsByName['created_at_month']! as i1.GeneratedColumn<String>;
}

i1.GeneratedColumn<int> _column_239(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'is_favorite',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_240(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'has_crop_analyzed',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL DEFAULT 0 CHECK (has_crop_analyzed IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<String> _column_241(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'created_at_month',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );

final class Schema15 extends i0.VersionedSchema {
  Schema15({required super.database}) : super(version: 15);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalSignedPreKeyStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
  ];
  late final Shape39 contacts = Shape39(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_213,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape49 mediaFiles = Shape49(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_239,
        _column_240,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_118,
        _column_241,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape50 signalSignedPreKeyStores = Shape50(
    source: i0.VersionedTable(
      entityName: 'signal_signed_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(signed_pre_key_id)'],
      columns: [_column_242, _column_243, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape40 keyVerifications = Shape40(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_216, _column_183, _column_144, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape42 userDiscoveryAnnouncedUsers = Shape42(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_173, _column_236, _column_237],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_238, _column_158],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape50 extends i0.VersionedTable {
  Shape50({required super.source, required super.alias}) : super.aliased();
  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<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_242(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'signed_pre_key_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_243(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'signed_pre_key',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NOT NULL',
    );

final class Schema16 extends i0.VersionedSchema {
  Schema16({required super.database}) : super(version: 16);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalSignedPreKeyStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
  ];
  late final Shape39 contacts = Shape39(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_213,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape51 mediaFiles = Shape51(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_239,
        _column_240,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_244,
        _column_245,
        _column_118,
        _column_241,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape50 signalSignedPreKeyStores = Shape50(
    source: i0.VersionedTable(
      entityName: 'signal_signed_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(signed_pre_key_id)'],
      columns: [_column_242, _column_243, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape40 keyVerifications = Shape40(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_216, _column_183, _column_144, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape42 userDiscoveryAnnouncedUsers = Shape42(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_173, _column_236, _column_237],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_238, _column_158],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape51 extends i0.VersionedTable {
  Shape51({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get mediaId =>
      columnsByName['media_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get uploadState =>
      columnsByName['upload_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get downloadState =>
      columnsByName['download_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get requiresAuthentication =>
      columnsByName['requires_authentication']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get stored =>
      columnsByName['stored']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get isDraftMedia =>
      columnsByName['is_draft_media']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get isFavorite =>
      columnsByName['is_favorite']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get hasCropAnalyzed =>
      columnsByName['has_crop_analyzed']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get preProgressingProcess =>
      columnsByName['pre_progressing_process']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get reuploadRequestedBy =>
      columnsByName['reupload_requested_by']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get displayLimitInMilliseconds =>
      columnsByName['display_limit_in_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get removeAudio =>
      columnsByName['remove_audio']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get downloadToken =>
      columnsByName['download_token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionKey =>
      columnsByName['encryption_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionMac =>
      columnsByName['encryption_mac']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionNonce =>
      columnsByName['encryption_nonce']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get storedFileHash =>
      columnsByName['stored_file_hash']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get hasThumbnail =>
      columnsByName['has_thumbnail']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get sizeInBytes =>
      columnsByName['size_in_bytes']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get createdAtMonth =>
      columnsByName['created_at_month']! as i1.GeneratedColumn<String>;
}

i1.GeneratedColumn<int> _column_244(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'has_thumbnail',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL DEFAULT 0 CHECK (has_thumbnail IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_245(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'size_in_bytes',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );

final class Schema17 extends i0.VersionedSchema {
  Schema17({required super.database}) : super(version: 17);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalSignedPreKeyStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
  ];
  late final Shape39 contacts = Shape39(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_213,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape51 mediaFiles = Shape51(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_239,
        _column_240,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_244,
        _column_245,
        _column_118,
        _column_241,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape50 signalSignedPreKeyStores = Shape50(
    source: i0.VersionedTable(
      entityName: 'signal_signed_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(signed_pre_key_id)'],
      columns: [_column_242, _column_243, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape40 keyVerifications = Shape40(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_216, _column_183, _column_144, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape52 userDiscoveryAnnouncedUsers = Shape52(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
        _column_246,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_173, _column_236, _column_237],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_238, _column_158],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape52 extends i0.VersionedTable {
  Shape52({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get announcedUserId =>
      columnsByName['announced_user_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get announcedPublicKey =>
      columnsByName['announced_public_key']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get publicId =>
      columnsByName['public_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get username =>
      columnsByName['username']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get wasShownToTheUser =>
      columnsByName['was_shown_to_the_user']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get isHidden =>
      columnsByName['is_hidden']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get wasAskedFriends =>
      columnsByName['was_asked_friends']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_246(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'was_asked_friends',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL DEFAULT 0 CHECK (was_asked_friends IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );

final class Schema18 extends i0.VersionedSchema {
  Schema18({required super.database}) : super(version: 18);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalSignedPreKeyStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
  ];
  late final Shape53 contacts = Shape53(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_247,
        _column_213,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape51 mediaFiles = Shape51(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_239,
        _column_240,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_244,
        _column_245,
        _column_118,
        _column_241,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape50 signalSignedPreKeyStores = Shape50(
    source: i0.VersionedTable(
      entityName: 'signal_signed_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(signed_pre_key_id)'],
      columns: [_column_242, _column_243, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape40 keyVerifications = Shape40(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_216, _column_183, _column_144, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape52 userDiscoveryAnnouncedUsers = Shape52(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
        _column_246,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_173, _column_236, _column_237],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_238, _column_158],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape53 extends i0.VersionedTable {
  Shape53({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<i2.Uint8List> get avatarSvgCompressed =>
      columnsByName['avatar_svg_compressed']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get senderProfileCounter =>
      columnsByName['sender_profile_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get deletedByUser =>
      columnsByName['deleted_by_user']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get requested =>
      columnsByName['requested']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get blocked =>
      columnsByName['blocked']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get verified =>
      columnsByName['verified']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get accountDeleted =>
      columnsByName['account_deleted']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get userDiscoveryVersion =>
      columnsByName['user_discovery_version']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get userDiscoveryExcluded =>
      columnsByName['user_discovery_excluded']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get askForFriendPromotions =>
      columnsByName['ask_for_friend_promotions']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get userDiscoveryManualApproved =>
      columnsByName['user_discovery_manual_approved']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaSendCounter =>
      columnsByName['media_send_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaReceivedCounter =>
      columnsByName['media_received_counter']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_247(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'ask_for_friend_promotions',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL CHECK (ask_for_friend_promotions IN (0, 1))',
    );

final class Schema19 extends i0.VersionedSchema {
  Schema19({required super.database}) : super(version: 19);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalSignedPreKeyStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
  ];
  late final Shape53 contacts = Shape53(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_247,
        _column_213,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape51 mediaFiles = Shape51(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_239,
        _column_240,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_244,
        _column_245,
        _column_118,
        _column_241,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape50 signalSignedPreKeyStores = Shape50(
    source: i0.VersionedTable(
      entityName: 'signal_signed_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(signed_pre_key_id)'],
      columns: [_column_242, _column_243, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape54 keyVerifications = Shape54(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_216,
        _column_183,
        _column_144,
        _column_248,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape52 userDiscoveryAnnouncedUsers = Shape52(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
        _column_246,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_173, _column_236, _column_237],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_238, _column_158],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape54 extends i0.VersionedTable {
  Shape54({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get verificationId =>
      columnsByName['verification_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get verifiedBy =>
      columnsByName['verified_by']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_248(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'verified_by',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL REFERENCES contacts(user_id)ON DELETE CASCADE',
    );

final class Schema20 extends i0.VersionedSchema {
  Schema20({required super.database}) : super(version: 20);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalSignedPreKeyStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
  ];
  late final Shape55 contacts = Shape55(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_213,
        _column_249,
        _column_250,
        _column_251,
        _column_247,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape51 mediaFiles = Shape51(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_239,
        _column_240,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_244,
        _column_245,
        _column_118,
        _column_241,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape50 signalSignedPreKeyStores = Shape50(
    source: i0.VersionedTable(
      entityName: 'signal_signed_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(signed_pre_key_id)'],
      columns: [_column_242, _column_243, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape54 keyVerifications = Shape54(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_216,
        _column_183,
        _column_144,
        _column_248,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape52 userDiscoveryAnnouncedUsers = Shape52(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
        _column_246,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_173, _column_236, _column_237],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_238, _column_158],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape55 extends i0.VersionedTable {
  Shape55({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<i2.Uint8List> get avatarSvgCompressed =>
      columnsByName['avatar_svg_compressed']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get senderProfileCounter =>
      columnsByName['sender_profile_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get deletedByUser =>
      columnsByName['deleted_by_user']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get requested =>
      columnsByName['requested']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get blocked =>
      columnsByName['blocked']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get verified =>
      columnsByName['verified']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get accountDeleted =>
      columnsByName['account_deleted']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get userDiscoveryVersion =>
      columnsByName['user_discovery_version']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get userDiscoveryExcluded =>
      columnsByName['user_discovery_excluded']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get userDiscoveryManualApproved =>
      columnsByName['user_discovery_manual_approved']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get recoveryIsTrustedFriend =>
      columnsByName['recovery_is_trusted_friend']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get recoveryLastHeartbeat =>
      columnsByName['recovery_last_heartbeat']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get recoverySecretShare =>
      columnsByName['recovery_secret_share']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get askForFriendPromotions =>
      columnsByName['ask_for_friend_promotions']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaSendCounter =>
      columnsByName['media_send_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaReceivedCounter =>
      columnsByName['media_received_counter']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_249(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'recovery_is_trusted_friend',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints:
          'NOT NULL DEFAULT 0 CHECK (recovery_is_trusted_friend IN (0, 1))',
      defaultValue: const i1.CustomExpression('0'),
    );
i1.GeneratedColumn<int> _column_250(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'recovery_last_heartbeat',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_251(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'recovery_secret_share',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );

final class Schema21 extends i0.VersionedSchema {
  Schema21({required super.database}) : super(version: 21);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalSignedPreKeyStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
  ];
  late final Shape56 contacts = Shape56(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_213,
        _column_249,
        _column_250,
        _column_251,
        _column_252,
        _column_253,
        _column_247,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape51 mediaFiles = Shape51(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_239,
        _column_240,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_244,
        _column_245,
        _column_118,
        _column_241,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape50 signalSignedPreKeyStores = Shape50(
    source: i0.VersionedTable(
      entityName: 'signal_signed_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(signed_pre_key_id)'],
      columns: [_column_242, _column_243, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape54 keyVerifications = Shape54(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_216,
        _column_183,
        _column_144,
        _column_248,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape52 userDiscoveryAnnouncedUsers = Shape52(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
        _column_246,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_173, _column_236, _column_237],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_238, _column_158],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape56 extends i0.VersionedTable {
  Shape56({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<i2.Uint8List> get avatarSvgCompressed =>
      columnsByName['avatar_svg_compressed']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get senderProfileCounter =>
      columnsByName['sender_profile_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get deletedByUser =>
      columnsByName['deleted_by_user']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get requested =>
      columnsByName['requested']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get blocked =>
      columnsByName['blocked']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get verified =>
      columnsByName['verified']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get accountDeleted =>
      columnsByName['account_deleted']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get userDiscoveryVersion =>
      columnsByName['user_discovery_version']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get userDiscoveryExcluded =>
      columnsByName['user_discovery_excluded']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get userDiscoveryManualApproved =>
      columnsByName['user_discovery_manual_approved']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get recoveryIsTrustedFriend =>
      columnsByName['recovery_is_trusted_friend']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get recoveryLastHeartbeat =>
      columnsByName['recovery_last_heartbeat']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get recoverySecretShare =>
      columnsByName['recovery_secret_share']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get recoveryContactsSecretShare =>
      columnsByName['recovery_contacts_secret_share']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get recoveryContactsLastHeartbeat =>
      columnsByName['recovery_contacts_last_heartbeat']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get askForFriendPromotions =>
      columnsByName['ask_for_friend_promotions']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaSendCounter =>
      columnsByName['media_send_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaReceivedCounter =>
      columnsByName['media_received_counter']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<i2.Uint8List> _column_252(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'recovery_contacts_secret_share',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NULL',
    );
i1.GeneratedColumn<int> _column_253(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'recovery_contacts_last_heartbeat',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );

final class Schema22 extends i0.VersionedSchema {
  Schema22({required super.database}) : super(version: 22);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalSignedPreKeyStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
  ];
  late final Shape57 contacts = Shape57(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_213,
        _column_249,
        _column_250,
        _column_251,
        _column_252,
        _column_253,
        _column_254,
        _column_247,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape51 mediaFiles = Shape51(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_239,
        _column_240,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_244,
        _column_245,
        _column_118,
        _column_241,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape50 signalSignedPreKeyStores = Shape50(
    source: i0.VersionedTable(
      entityName: 'signal_signed_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(signed_pre_key_id)'],
      columns: [_column_242, _column_243, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape54 keyVerifications = Shape54(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_216,
        _column_183,
        _column_144,
        _column_248,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape52 userDiscoveryAnnouncedUsers = Shape52(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
        _column_246,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_173, _column_236, _column_237],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_238, _column_158],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape57 extends i0.VersionedTable {
  Shape57({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<i2.Uint8List> get avatarSvgCompressed =>
      columnsByName['avatar_svg_compressed']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get senderProfileCounter =>
      columnsByName['sender_profile_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get deletedByUser =>
      columnsByName['deleted_by_user']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get requested =>
      columnsByName['requested']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get blocked =>
      columnsByName['blocked']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get verified =>
      columnsByName['verified']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get accountDeleted =>
      columnsByName['account_deleted']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get userDiscoveryVersion =>
      columnsByName['user_discovery_version']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get userDiscoveryExcluded =>
      columnsByName['user_discovery_excluded']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get userDiscoveryManualApproved =>
      columnsByName['user_discovery_manual_approved']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get recoveryIsTrustedFriend =>
      columnsByName['recovery_is_trusted_friend']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get recoveryLastHeartbeat =>
      columnsByName['recovery_last_heartbeat']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get recoverySecretShare =>
      columnsByName['recovery_secret_share']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get recoveryContactsSecretShare =>
      columnsByName['recovery_contacts_secret_share']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get recoveryContactsLastHeartbeat =>
      columnsByName['recovery_contacts_last_heartbeat']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get recoveryContactsThreshold =>
      columnsByName['recovery_contacts_threshold']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get askForFriendPromotions =>
      columnsByName['ask_for_friend_promotions']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaSendCounter =>
      columnsByName['media_send_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaReceivedCounter =>
      columnsByName['media_received_counter']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_254(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'recovery_contacts_threshold',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NULL',
    );

final class Schema23 extends i0.VersionedSchema {
  Schema23({required super.database}) : super(version: 23);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalSignedPreKeyStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
  ];
  late final Shape57 contacts = Shape57(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_213,
        _column_249,
        _column_250,
        _column_251,
        _column_252,
        _column_253,
        _column_254,
        _column_247,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape58 mediaFiles = Shape58(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_255,
        _column_256,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_239,
        _column_240,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_244,
        _column_245,
        _column_118,
        _column_241,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape50 signalSignedPreKeyStores = Shape50(
    source: i0.VersionedTable(
      entityName: 'signal_signed_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(signed_pre_key_id)'],
      columns: [_column_242, _column_243, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape54 keyVerifications = Shape54(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_216,
        _column_183,
        _column_144,
        _column_248,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape52 userDiscoveryAnnouncedUsers = Shape52(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
        _column_246,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_173, _column_236, _column_237],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_238, _column_158],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape58 extends i0.VersionedTable {
  Shape58({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get mediaId =>
      columnsByName['media_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get uploadState =>
      columnsByName['upload_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get cloudState =>
      columnsByName['cloud_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get blurhash =>
      columnsByName['blurhash']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get downloadState =>
      columnsByName['download_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get requiresAuthentication =>
      columnsByName['requires_authentication']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get stored =>
      columnsByName['stored']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get isDraftMedia =>
      columnsByName['is_draft_media']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get isFavorite =>
      columnsByName['is_favorite']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get hasCropAnalyzed =>
      columnsByName['has_crop_analyzed']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get preProgressingProcess =>
      columnsByName['pre_progressing_process']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get reuploadRequestedBy =>
      columnsByName['reupload_requested_by']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get displayLimitInMilliseconds =>
      columnsByName['display_limit_in_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get removeAudio =>
      columnsByName['remove_audio']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get downloadToken =>
      columnsByName['download_token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionKey =>
      columnsByName['encryption_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionMac =>
      columnsByName['encryption_mac']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionNonce =>
      columnsByName['encryption_nonce']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get storedFileHash =>
      columnsByName['stored_file_hash']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get hasThumbnail =>
      columnsByName['has_thumbnail']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get sizeInBytes =>
      columnsByName['size_in_bytes']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get createdAtMonth =>
      columnsByName['created_at_month']! as i1.GeneratedColumn<String>;
}

i1.GeneratedColumn<String> _column_255(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'cloud_state',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL DEFAULT \'none\'',
      defaultValue: const i1.CustomExpression('\'none\''),
    );
i1.GeneratedColumn<String> _column_256(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'blurhash',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NULL',
    );

final class Schema24 extends i0.VersionedSchema {
  Schema24({required super.database}) : super(version: 24);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalSignedPreKeyStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
    labels,
    contactLabels,
  ];
  late final Shape57 contacts = Shape57(
    source: i0.VersionedTable(
      entityName: 'contacts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(user_id)'],
      columns: [
        _column_106,
        _column_107,
        _column_108,
        _column_109,
        _column_110,
        _column_111,
        _column_112,
        _column_113,
        _column_114,
        _column_115,
        _column_116,
        _column_117,
        _column_118,
        _column_211,
        _column_212,
        _column_213,
        _column_249,
        _column_250,
        _column_251,
        _column_252,
        _column_253,
        _column_254,
        _column_247,
        _column_214,
        _column_215,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape23 groups = Shape23(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_119,
        _column_120,
        _column_121,
        _column_122,
        _column_123,
        _column_124,
        _column_125,
        _column_126,
        _column_127,
        _column_128,
        _column_129,
        _column_130,
        _column_131,
        _column_132,
        _column_133,
        _column_134,
        _column_118,
        _column_135,
        _column_136,
        _column_137,
        _column_138,
        _column_139,
        _column_140,
        _column_141,
        _column_142,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape58 mediaFiles = Shape58(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_143,
        _column_144,
        _column_145,
        _column_255,
        _column_256,
        _column_146,
        _column_147,
        _column_148,
        _column_149,
        _column_239,
        _column_240,
        _column_207,
        _column_150,
        _column_151,
        _column_152,
        _column_153,
        _column_154,
        _column_155,
        _column_156,
        _column_157,
        _column_244,
        _column_245,
        _column_118,
        _column_241,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape25 messages = Shape25(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_158,
        _column_159,
        _column_160,
        _column_144,
        _column_161,
        _column_162,
        _column_163,
        _column_164,
        _column_165,
        _column_153,
        _column_166,
        _column_167,
        _column_168,
        _column_169,
        _column_118,
        _column_170,
        _column_171,
        _column_172,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape26 messageHistories = Shape26(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_174,
        _column_175,
        _column_161,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape27 reactions = Shape27(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_174, _column_176, _column_177, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape38 groupMembers = Shape38(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_158,
        _column_178,
        _column_179,
        _column_180,
        _column_209,
        _column_210,
        _column_181,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape37 receipts = Shape37(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_182,
        _column_183,
        _column_184,
        _column_185,
        _column_186,
        _column_208,
        _column_187,
        _column_188,
        _column_189,
        _column_190,
        _column_191,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape30 receivedReceipts = Shape30(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_182, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape31 signalIdentityKeyStores = Shape31(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_194, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape32 signalPreKeyStores = Shape32(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_195, _column_196, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_197, _column_198],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape33 signalSessionStores = Shape33(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_192, _column_193, _column_199, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape50 signalSignedPreKeyStores = Shape50(
    source: i0.VersionedTable(
      entityName: 'signal_signed_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(signed_pre_key_id)'],
      columns: [_column_242, _column_243, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape34 messageActions = Shape34(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_174, _column_183, _column_144, _column_200],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape35 groupHistories = Shape35(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_201,
        _column_158,
        _column_202,
        _column_203,
        _column_204,
        _column_205,
        _column_206,
        _column_144,
        _column_200,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape54 keyVerifications = Shape54(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_216,
        _column_183,
        _column_144,
        _column_248,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape41 verificationTokens = Shape41(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_217, _column_218, _column_118],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape52 userDiscoveryAnnouncedUsers = Shape52(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_219,
        _column_220,
        _column_221,
        _column_222,
        _column_223,
        _column_224,
        _column_246,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape43 userDiscoveryUserRelations = Shape43(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_225, _column_226, _column_227],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape44 userDiscoveryOtherPromotions = Shape44(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_226,
        _column_228,
        _column_229,
        _column_230,
        _column_231,
        _column_227,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_232, _column_183, _column_233],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_234, _column_235, _column_175],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_173, _column_236, _column_237],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_238, _column_158],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape59 labels = Shape59(
    source: i0.VersionedTable(
      entityName: 'labels',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [
        _column_173,
        _column_193,
        _column_257,
        _column_258,
        _column_118,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape60 contactLabels = Shape60(
    source: i0.VersionedTable(
      entityName: 'contact_labels',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id, label_id)'],
      columns: [_column_183, _column_259],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape59 extends i0.VersionedTable {
  Shape59({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get id =>
      columnsByName['id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get name =>
      columnsByName['name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get textColor =>
      columnsByName['text_color']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get backgroundColor =>
      columnsByName['background_color']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_257(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'text_color',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<int> _column_258(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'background_color',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL',
    );

class Shape60 extends i0.VersionedTable {
  Shape60({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get labelId =>
      columnsByName['label_id']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_259(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'label_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL REFERENCES labels(id)ON DELETE CASCADE',
    );

final class Schema25 extends i0.VersionedSchema {
  Schema25({required super.database}) : super(version: 25);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    contacts,
    groups,
    mediaFiles,
    messages,
    messageHistories,
    reactions,
    groupMembers,
    receipts,
    receivedReceipts,
    signalIdentityKeyStores,
    signalPreKeyStores,
    signalSenderKeyStores,
    signalSessionStores,
    signalSignedPreKeyStores,
    messageActions,
    groupHistories,
    keyVerifications,
    verificationTokens,
    userDiscoveryAnnouncedUsers,
    userDiscoveryUserRelations,
    userDiscoveryOtherPromotions,
    userDiscoveryOwnPromotions,
    userDiscoveryShares,
    shortcuts,
    shortcutMembers,
    labels,
    contactLabels,
  ];
  late final Shape61 contacts = Shape61(
    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_260,
        _column_261,
        _column_262,
        _column_263,
        _column_264,
        _column_265,
        _column_266,
        _column_267,
        _column_268,
        _column_269,
        _column_270,
        _column_271,
        _column_272,
        _column_273,
        _column_274,
        _column_275,
        _column_276,
        _column_277,
        _column_278,
        _column_279,
        _column_280,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape17 groups = Shape17(
    source: i0.VersionedTable(
      entityName: 'groups',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id)'],
      columns: [
        _column_13,
        _column_281,
        _column_282,
        _column_283,
        _column_284,
        _column_285,
        _column_286,
        _column_287,
        _column_288,
        _column_22,
        _column_23,
        _column_24,
        _column_100,
        _column_289,
        _column_290,
        _column_291,
        _column_267,
        _column_28,
        _column_29,
        _column_30,
        _column_31,
        _column_292,
        _column_293,
        _column_34,
        _column_294,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape62 mediaFiles = Shape62(
    source: i0.VersionedTable(
      entityName: 'media_files',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(media_id)'],
      columns: [
        _column_36,
        _column_37,
        _column_38,
        _column_295,
        _column_296,
        _column_39,
        _column_297,
        _column_298,
        _column_299,
        _column_300,
        _column_301,
        _column_302,
        _column_43,
        _column_44,
        _column_45,
        _column_46,
        _column_47,
        _column_48,
        _column_49,
        _column_102,
        _column_303,
        _column_304,
        _column_267,
        _column_305,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape21 messages = Shape21(
    source: i0.VersionedTable(
      entityName: 'messages',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id)'],
      columns: [
        _column_50,
        _column_51,
        _column_52,
        _column_37,
        _column_53,
        _column_54,
        _column_105,
        _column_306,
        _column_307,
        _column_46,
        _column_57,
        _column_308,
        _column_59,
        _column_60,
        _column_267,
        _column_61,
        _column_62,
        _column_63,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape4 messageHistories = Shape4(
    source: i0.VersionedTable(
      entityName: 'message_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_64, _column_65, _column_309, _column_53, _column_267],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape5 reactions = Shape5(
    source: i0.VersionedTable(
      entityName: 'reactions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, sender_id, emoji)'],
      columns: [_column_65, _column_67, _column_68, _column_267],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape63 groupMembers = Shape63(
    source: i0.VersionedTable(
      entityName: 'group_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_id, contact_id)'],
      columns: [
        _column_50,
        _column_69,
        _column_70,
        _column_71,
        _column_310,
        _column_311,
        _column_72,
        _column_267,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape64 receipts = Shape64(
    source: i0.VersionedTable(
      entityName: 'receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [
        _column_73,
        _column_74,
        _column_75,
        _column_76,
        _column_312,
        _column_313,
        _column_103,
        _column_104,
        _column_78,
        _column_314,
        _column_80,
        _column_267,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape8 receivedReceipts = Shape8(
    source: i0.VersionedTable(
      entityName: 'received_receipts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(receipt_id)'],
      columns: [_column_73, _column_267],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape9 signalIdentityKeyStores = Shape9(
    source: i0.VersionedTable(
      entityName: 'signal_identity_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_83, _column_267],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape10 signalPreKeyStores = Shape10(
    source: i0.VersionedTable(
      entityName: 'signal_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(pre_key_id)'],
      columns: [_column_84, _column_85, _column_267],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape11 signalSenderKeyStores = Shape11(
    source: i0.VersionedTable(
      entityName: 'signal_sender_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(sender_key_name)'],
      columns: [_column_86, _column_87],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape12 signalSessionStores = Shape12(
    source: i0.VersionedTable(
      entityName: 'signal_session_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(device_id, name)'],
      columns: [_column_81, _column_82, _column_88, _column_267],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape65 signalSignedPreKeyStores = Shape65(
    source: i0.VersionedTable(
      entityName: 'signal_signed_pre_key_stores',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(signed_pre_key_id)'],
      columns: [_column_89, _column_90, _column_267],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape15 messageActions = Shape15(
    source: i0.VersionedTable(
      entityName: 'message_actions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(message_id, contact_id, type)'],
      columns: [_column_65, _column_74, _column_37, _column_315],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape16 groupHistories = Shape16(
    source: i0.VersionedTable(
      entityName: 'group_histories',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(group_history_id)'],
      columns: [
        _column_94,
        _column_50,
        _column_95,
        _column_101,
        _column_97,
        _column_98,
        _column_99,
        _column_37,
        _column_315,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape66 keyVerifications = Shape66(
    source: i0.VersionedTable(
      entityName: 'key_verifications',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_316, _column_74, _column_37, _column_317, _column_267],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape67 verificationTokens = Shape67(
    source: i0.VersionedTable(
      entityName: 'verification_tokens',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_318, _column_319, _column_267],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape68 userDiscoveryAnnouncedUsers = Shape68(
    source: i0.VersionedTable(
      entityName: 'user_discovery_announced_users',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id)'],
      columns: [
        _column_320,
        _column_321,
        _column_322,
        _column_323,
        _column_324,
        _column_325,
        _column_326,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape69 userDiscoveryUserRelations = Shape69(
    source: i0.VersionedTable(
      entityName: 'user_discovery_user_relations',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(announced_user_id, from_contact_id)'],
      columns: [_column_327, _column_328, _column_329],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape70 userDiscoveryOtherPromotions = Shape70(
    source: i0.VersionedTable(
      entityName: 'user_discovery_other_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(from_contact_id, public_id)'],
      columns: [
        _column_328,
        _column_330,
        _column_331,
        _column_332,
        _column_333,
        _column_329,
      ],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape45 userDiscoveryOwnPromotions = Shape45(
    source: i0.VersionedTable(
      entityName: 'user_discovery_own_promotions',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_334, _column_74, _column_335],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape46 userDiscoveryShares = Shape46(
    source: i0.VersionedTable(
      entityName: 'user_discovery_shares',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_336, _column_337, _column_309],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape47 shortcuts = Shape47(
    source: i0.VersionedTable(
      entityName: 'shortcuts',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_64, _column_338, _column_339],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape48 shortcutMembers = Shape48(
    source: i0.VersionedTable(
      entityName: 'shortcut_members',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(shortcut_id, group_id)'],
      columns: [_column_340, _column_50],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape71 labels = Shape71(
    source: i0.VersionedTable(
      entityName: 'labels',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_64, _column_82, _column_341, _column_342, _column_267],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape60 contactLabels = Shape60(
    source: i0.VersionedTable(
      entityName: 'contact_labels',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: ['PRIMARY KEY(contact_id, label_id)'],
      columns: [_column_74, _column_343],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape61 extends i0.VersionedTable {
  Shape61({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<i2.Uint8List> get avatarSvgCompressed =>
      columnsByName['avatar_svg_compressed']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get senderProfileCounter =>
      columnsByName['sender_profile_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get accepted =>
      columnsByName['accepted']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get deletedByUser =>
      columnsByName['deleted_by_user']! 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 accountDeleted =>
      columnsByName['account_deleted']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<String> get signalVersion =>
      columnsByName['signal_version']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get userDiscoveryVersion =>
      columnsByName['user_discovery_version']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<bool> get userDiscoveryExcluded =>
      columnsByName['user_discovery_excluded']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get userDiscoveryManualApproved =>
      columnsByName['user_discovery_manual_approved']!
          as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get recoveryIsTrustedFriend =>
      columnsByName['recovery_is_trusted_friend']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<DateTime> get recoveryLastHeartbeat =>
      columnsByName['recovery_last_heartbeat']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<i2.Uint8List> get recoverySecretShare =>
      columnsByName['recovery_secret_share']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get recoveryContactsSecretShare =>
      columnsByName['recovery_contacts_secret_share']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get recoveryContactsLastHeartbeat =>
      columnsByName['recovery_contacts_last_heartbeat']!
          as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<int> get recoveryContactsThreshold =>
      columnsByName['recovery_contacts_threshold']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get askForFriendPromotions =>
      columnsByName['ask_for_friend_promotions']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get mediaSendCounter =>
      columnsByName['media_send_counter']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get mediaReceivedCounter =>
      columnsByName['media_received_counter']! as i1.GeneratedColumn<int>;
}

i1.GeneratedColumn<int> _column_260(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'sender_profile_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const Constant(0),
    );
i1.GeneratedColumn<bool> _column_261(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'accepted',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("accepted" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_262(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'deleted_by_user',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("deleted_by_user" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_263(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'requested',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("requested" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_264(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'blocked',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("blocked" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_265(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'verified',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("verified" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_266(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'account_deleted',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("account_deleted" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<DateTime> _column_267(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'created_at',
      aliasedName,
      false,
      type: i1.DriftSqlType.dateTime,
      defaultValue: currentDateAndTime,
    );
i1.GeneratedColumn<String> _column_268(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'signal_version',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      defaultValue: const Constant('v1'),
    );
i1.GeneratedColumn<i2.Uint8List> _column_269(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'user_discovery_version',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<bool> _column_270(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'user_discovery_excluded',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("user_discovery_excluded" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_271(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'user_discovery_manual_approved',
      aliasedName,
      true,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("user_discovery_manual_approved" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_272(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'recovery_is_trusted_friend',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("recovery_is_trusted_friend" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<DateTime> _column_273(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'recovery_last_heartbeat',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<i2.Uint8List> _column_274(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'recovery_secret_share',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<i2.Uint8List> _column_275(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'recovery_contacts_secret_share',
      aliasedName,
      true,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<DateTime> _column_276(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'recovery_contacts_last_heartbeat',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<int> _column_277(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'recovery_contacts_threshold',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<bool> _column_278(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'ask_for_friend_promotions',
      aliasedName,
      true,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("ask_for_friend_promotions" IN (0, 1))',
      ),
    );
i1.GeneratedColumn<int> _column_279(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'media_send_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const Constant(0),
    );
i1.GeneratedColumn<int> _column_280(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'media_received_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const Constant(0),
    );
i1.GeneratedColumn<bool> _column_281(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'is_group_admin',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("is_group_admin" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_282(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'is_direct_chat',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("is_direct_chat" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_283(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'pinned',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("pinned" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_284(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'archived',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("archived" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_285(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'joined_group',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("joined_group" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_286(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'left_group',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("left_group" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_287(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'deleted_content',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("deleted_content" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<int> _column_288(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'state_version_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const Constant(0),
    );
i1.GeneratedColumn<int> _column_289(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'total_media_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const Constant(0),
    );
i1.GeneratedColumn<bool> _column_290(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 Constant(false),
    );
i1.GeneratedColumn<int> _column_291(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'delete_messages_after_milliseconds',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const Constant(defaultDeleteMessagesAfterMilliseconds),
    );
i1.GeneratedColumn<int> _column_292(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'flame_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const Constant(0),
    );
i1.GeneratedColumn<int> _column_293(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'max_flame_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const Constant(0),
    );
i1.GeneratedColumn<DateTime> _column_294(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'last_message_exchange',
      aliasedName,
      false,
      type: i1.DriftSqlType.dateTime,
      defaultValue: currentDateAndTime,
    );

class Shape62 extends i0.VersionedTable {
  Shape62({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get mediaId =>
      columnsByName['media_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get uploadState =>
      columnsByName['upload_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get cloudState =>
      columnsByName['cloud_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get blurhash =>
      columnsByName['blurhash']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get downloadState =>
      columnsByName['download_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<bool> get requiresAuthentication =>
      columnsByName['requires_authentication']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get stored =>
      columnsByName['stored']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get isDraftMedia =>
      columnsByName['is_draft_media']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get isFavorite =>
      columnsByName['is_favorite']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get hasCropAnalyzed =>
      columnsByName['has_crop_analyzed']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get preProgressingProcess =>
      columnsByName['pre_progressing_process']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get reuploadRequestedBy =>
      columnsByName['reupload_requested_by']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get displayLimitInMilliseconds =>
      columnsByName['display_limit_in_milliseconds']!
          as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<bool> get removeAudio =>
      columnsByName['remove_audio']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<i2.Uint8List> get downloadToken =>
      columnsByName['download_token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionKey =>
      columnsByName['encryption_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionMac =>
      columnsByName['encryption_mac']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get encryptionNonce =>
      columnsByName['encryption_nonce']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<i2.Uint8List> get storedFileHash =>
      columnsByName['stored_file_hash']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<bool> get hasThumbnail =>
      columnsByName['has_thumbnail']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<int> get sizeInBytes =>
      columnsByName['size_in_bytes']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<String> get createdAtMonth =>
      columnsByName['created_at_month']! as i1.GeneratedColumn<String>;
}

i1.GeneratedColumn<String> _column_295(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'cloud_state',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      defaultValue: const Constant('none'),
    );
i1.GeneratedColumn<String> _column_296(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'blurhash',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<bool> _column_297(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'requires_authentication',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("requires_authentication" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_298(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'stored',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("stored" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_299(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'is_draft_media',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("is_draft_media" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_300(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'is_favorite',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("is_favorite" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_301(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'has_crop_analyzed',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("has_crop_analyzed" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<int> _column_302(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'pre_progressing_process',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<bool> _column_303(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'has_thumbnail',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("has_thumbnail" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<int> _column_304(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'size_in_bytes',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<String> _column_305(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'created_at_month',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<bool> _column_306(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 Constant(false),
    );
i1.GeneratedColumn<bool> _column_307(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'media_reopened',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("media_reopened" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_308(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'is_deleted_from_sender',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("is_deleted_from_sender" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<int> _column_309(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'contact_id',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES contacts (user_id) ON DELETE CASCADE',
      ),
    );

class Shape63 extends i0.VersionedTable {
  Shape63({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get groupId =>
      columnsByName['group_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get memberState =>
      columnsByName['member_state']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get groupPublicKey =>
      columnsByName['group_public_key']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get lastChatOpened =>
      columnsByName['last_chat_opened']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastTypeIndicator =>
      columnsByName['last_type_indicator']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get lastMessage =>
      columnsByName['last_message']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<DateTime> _column_310(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'last_chat_opened',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );
i1.GeneratedColumn<DateTime> _column_311(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'last_type_indicator',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );

class Shape64 extends i0.VersionedTable {
  Shape64({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get receiptId =>
      columnsByName['receipt_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get messageId =>
      columnsByName['message_id']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get message =>
      columnsByName['message']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<bool> get contactWillSendsReceipt =>
      columnsByName['contact_will_sends_receipt']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get willBeRetriedByMediaUpload =>
      columnsByName['will_be_retried_by_media_upload']!
          as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<DateTime> get markForRetry =>
      columnsByName['mark_for_retry']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get markForRetryAfterAccepted =>
      columnsByName['mark_for_retry_after_accepted']!
          as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<DateTime> get ackByServerAt =>
      columnsByName['ack_by_server_at']! as i1.GeneratedColumn<DateTime>;
  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 createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<bool> _column_312(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'contact_will_sends_receipt',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("contact_will_sends_receipt" IN (0, 1))',
      ),
      defaultValue: const Constant(true),
    );
i1.GeneratedColumn<bool> _column_313(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'will_be_retried_by_media_upload',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("will_be_retried_by_media_upload" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<int> _column_314(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'retry_count',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const Constant(0),
    );

class Shape65 extends i0.VersionedTable {
  Shape65({required super.source, required super.alias}) : super.aliased();
  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<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<DateTime> _column_315(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'action_at',
      aliasedName,
      false,
      type: i1.DriftSqlType.dateTime,
      defaultValue: currentDateAndTime,
    );

class Shape66 extends i0.VersionedTable {
  Shape66({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get verificationId =>
      columnsByName['verification_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get contactId =>
      columnsByName['contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get type =>
      columnsByName['type']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get verifiedBy =>
      columnsByName['verified_by']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_316(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'verification_id',
      aliasedName,
      false,
      hasAutoIncrement: true,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'PRIMARY KEY AUTOINCREMENT',
      ),
    );
i1.GeneratedColumn<int> _column_317(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'verified_by',
      aliasedName,
      true,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES contacts (user_id) ON DELETE CASCADE',
      ),
    );

class Shape67 extends i0.VersionedTable {
  Shape67({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get tokenId =>
      columnsByName['token_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get token =>
      columnsByName['token']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_318(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'token_id',
      aliasedName,
      false,
      hasAutoIncrement: true,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'PRIMARY KEY AUTOINCREMENT',
      ),
    );
i1.GeneratedColumn<i2.Uint8List> _column_319(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'token',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
    );

class Shape68 extends i0.VersionedTable {
  Shape68({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get announcedUserId =>
      columnsByName['announced_user_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get announcedPublicKey =>
      columnsByName['announced_public_key']!
          as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<int> get publicId =>
      columnsByName['public_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get username =>
      columnsByName['username']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<bool> get wasShownToTheUser =>
      columnsByName['was_shown_to_the_user']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get isHidden =>
      columnsByName['is_hidden']! as i1.GeneratedColumn<bool>;
  i1.GeneratedColumn<bool> get wasAskedFriends =>
      columnsByName['was_asked_friends']! as i1.GeneratedColumn<bool>;
}

i1.GeneratedColumn<int> _column_320(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'announced_user_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<i2.Uint8List> _column_321(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'announced_public_key',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<int> _column_322(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'public_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways('UNIQUE'),
    );
i1.GeneratedColumn<String> _column_323(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'username',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
    );
i1.GeneratedColumn<bool> _column_324(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'was_shown_to_the_user',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("was_shown_to_the_user" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_325(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'is_hidden',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("is_hidden" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );
i1.GeneratedColumn<bool> _column_326(String aliasedName) =>
    i1.GeneratedColumn<bool>(
      'was_asked_friends',
      aliasedName,
      false,
      type: i1.DriftSqlType.bool,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'CHECK ("was_asked_friends" IN (0, 1))',
      ),
      defaultValue: const Constant(false),
    );

class Shape69 extends i0.VersionedTable {
  Shape69({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get announcedUserId =>
      columnsByName['announced_user_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get fromContactId =>
      columnsByName['from_contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get publicKeyVerifiedTimestamp =>
      columnsByName['public_key_verified_timestamp']!
          as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_327(
  String aliasedName,
) => i1.GeneratedColumn<int>(
  'announced_user_id',
  aliasedName,
  false,
  type: i1.DriftSqlType.int,
  defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
    'REFERENCES user_discovery_announced_users (announced_user_id) ON DELETE CASCADE',
  ),
);
i1.GeneratedColumn<int> _column_328(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'from_contact_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES contacts (user_id) ON DELETE CASCADE',
      ),
    );
i1.GeneratedColumn<DateTime> _column_329(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'public_key_verified_timestamp',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
    );

class Shape70 extends i0.VersionedTable {
  Shape70({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get fromContactId =>
      columnsByName['from_contact_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get promotionId =>
      columnsByName['promotion_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get publicId =>
      columnsByName['public_id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get threshold =>
      columnsByName['threshold']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<i2.Uint8List> get announcementShare =>
      columnsByName['announcement_share']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get publicKeyVerifiedTimestamp =>
      columnsByName['public_key_verified_timestamp']!
          as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_330(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'promotion_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<int> _column_331(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'public_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<int> _column_332(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'threshold',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<i2.Uint8List> _column_333(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'announcement_share',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<int> _column_334(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'version_id',
      aliasedName,
      false,
      hasAutoIncrement: true,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'PRIMARY KEY AUTOINCREMENT',
      ),
    );
i1.GeneratedColumn<i2.Uint8List> _column_335(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'promotion',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<int> _column_336(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'share_id',
      aliasedName,
      false,
      hasAutoIncrement: true,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'PRIMARY KEY AUTOINCREMENT',
      ),
    );
i1.GeneratedColumn<i2.Uint8List> _column_337(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'share',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
    );
i1.GeneratedColumn<String> _column_338(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'emoji',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways('UNIQUE'),
    );
i1.GeneratedColumn<int> _column_339(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'usage_counter',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultValue: const Constant(0),
    );
i1.GeneratedColumn<int> _column_340(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'shortcut_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES shortcuts (id) ON DELETE CASCADE',
      ),
    );

class Shape71 extends i0.VersionedTable {
  Shape71({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get id =>
      columnsByName['id']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<String> get name =>
      columnsByName['name']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<int> get textColor =>
      columnsByName['text_color']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<int> get backgroundColor =>
      columnsByName['background_color']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get createdAt =>
      columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_341(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'text_color',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<int> _column_342(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'background_color',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
    );
i1.GeneratedColumn<int> _column_343(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'label_id',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
        'REFERENCES labels (id) ON DELETE CASCADE',
      ),
    );
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,
  required Future<void> Function(i1.Migrator m, Schema18 schema) from17To18,
  required Future<void> Function(i1.Migrator m, Schema19 schema) from18To19,
  required Future<void> Function(i1.Migrator m, Schema20 schema) from19To20,
  required Future<void> Function(i1.Migrator m, Schema21 schema) from20To21,
  required Future<void> Function(i1.Migrator m, Schema22 schema) from21To22,
  required Future<void> Function(i1.Migrator m, Schema23 schema) from22To23,
  required Future<void> Function(i1.Migrator m, Schema24 schema) from23To24,
  required Future<void> Function(i1.Migrator m, Schema25 schema) from24To25,
}) {
  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;
      case 17:
        final schema = Schema18(database: database);
        final migrator = i1.Migrator(database, schema);
        await from17To18(migrator, schema);
        return 18;
      case 18:
        final schema = Schema19(database: database);
        final migrator = i1.Migrator(database, schema);
        await from18To19(migrator, schema);
        return 19;
      case 19:
        final schema = Schema20(database: database);
        final migrator = i1.Migrator(database, schema);
        await from19To20(migrator, schema);
        return 20;
      case 20:
        final schema = Schema21(database: database);
        final migrator = i1.Migrator(database, schema);
        await from20To21(migrator, schema);
        return 21;
      case 21:
        final schema = Schema22(database: database);
        final migrator = i1.Migrator(database, schema);
        await from21To22(migrator, schema);
        return 22;
      case 22:
        final schema = Schema23(database: database);
        final migrator = i1.Migrator(database, schema);
        await from22To23(migrator, schema);
        return 23;
      case 23:
        final schema = Schema24(database: database);
        final migrator = i1.Migrator(database, schema);
        await from23To24(migrator, schema);
        return 24;
      case 24:
        final schema = Schema25(database: database);
        final migrator = i1.Migrator(database, schema);
        await from24To25(migrator, schema);
        return 25;
      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,
  required Future<void> Function(i1.Migrator m, Schema18 schema) from17To18,
  required Future<void> Function(i1.Migrator m, Schema19 schema) from18To19,
  required Future<void> Function(i1.Migrator m, Schema20 schema) from19To20,
  required Future<void> Function(i1.Migrator m, Schema21 schema) from20To21,
  required Future<void> Function(i1.Migrator m, Schema22 schema) from21To22,
  required Future<void> Function(i1.Migrator m, Schema23 schema) from22To23,
  required Future<void> Function(i1.Migrator m, Schema24 schema) from23To24,
  required Future<void> Function(i1.Migrator m, Schema25 schema) from24To25,
}) => 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,
    from17To18: from17To18,
    from18To19: from18To19,
    from19To20: from19To20,
    from20To21: from20To21,
    from21To22: from21To22,
    from22To23: from22To23,
    from23To24: from23To24,
    from24To25: from24To25,
  ),
);
