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

// GENERATED BY drift_dev, DO NOT MODIFY.
final class Schema2 extends i0.VersionedSchema {
  Schema2({required super.database}) : super(version: 2);
  @override
  late final List<i1.DatabaseSchemaEntity> entities = [
    setting,
    iconCache,
    onboarding,
    riverpod,
  ];
  late final Shape0 setting = Shape0(
    source: i0.VersionedTable(
      entityName: 'setting',
      withoutRowId: false,
      isStrict: true,
      tableConstraints: [],
      columns: [_column_0, _column_1, _column_2],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape1 iconCache = Shape1(
    source: i0.VersionedTable(
      entityName: 'icon_cache',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_3, _column_4, _column_5],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape2 onboarding = Shape2(
    source: i0.VersionedTable(
      entityName: 'onboarding',
      withoutRowId: false,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_6, _column_7],
      attachedDatabase: database,
    ),
    alias: null,
  );
  late final Shape3 riverpod = Shape3(
    source: i0.VersionedTable(
      entityName: 'riverpod',
      withoutRowId: true,
      isStrict: false,
      tableConstraints: [],
      columns: [_column_0, _column_8, _column_9, _column_10],
      attachedDatabase: database,
    ),
    alias: null,
  );
}

class Shape0 extends i0.VersionedTable {
  Shape0({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get key =>
      columnsByName['key']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get partitionKey =>
      columnsByName['partition_key']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i1.DriftAny> get value =>
      columnsByName['value']! as i1.GeneratedColumn<i1.DriftAny>;
}

i1.GeneratedColumn<String> _column_0(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'key',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'PRIMARY KEY NOT NULL',
    );
i1.GeneratedColumn<String> _column_1(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'partition_key',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: '',
    );
i1.GeneratedColumn<i1.DriftAny> _column_2(String aliasedName) =>
    i1.GeneratedColumn<i1.DriftAny>(
      'value',
      aliasedName,
      true,
      type: i1.DriftSqlType.any,
      $customConstraints: '',
    );

class Shape1 extends i0.VersionedTable {
  Shape1({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get origin =>
      columnsByName['origin']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<i2.Uint8List> get iconData =>
      columnsByName['icon_data']! as i1.GeneratedColumn<i2.Uint8List>;
  i1.GeneratedColumn<DateTime> get fetchDate =>
      columnsByName['fetch_date']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<String> _column_3(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'origin',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'PRIMARY KEY NOT NULL',
    );
i1.GeneratedColumn<i2.Uint8List> _column_4(String aliasedName) =>
    i1.GeneratedColumn<i2.Uint8List>(
      'icon_data',
      aliasedName,
      false,
      type: i1.DriftSqlType.blob,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<DateTime> _column_5(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'fetch_date',
      aliasedName,
      false,
      type: i1.DriftSqlType.dateTime,
      $customConstraints: 'NOT NULL',
    );

class Shape2 extends i0.VersionedTable {
  Shape2({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<int> get revision =>
      columnsByName['revision']! as i1.GeneratedColumn<int>;
  i1.GeneratedColumn<DateTime> get completionDate =>
      columnsByName['completion_date']! as i1.GeneratedColumn<DateTime>;
}

i1.GeneratedColumn<int> _column_6(String aliasedName) =>
    i1.GeneratedColumn<int>(
      'revision',
      aliasedName,
      false,
      type: i1.DriftSqlType.int,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<DateTime> _column_7(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'completion_date',
      aliasedName,
      false,
      type: i1.DriftSqlType.dateTime,
      $customConstraints: 'NOT NULL',
    );

class Shape3 extends i0.VersionedTable {
  Shape3({required super.source, required super.alias}) : super.aliased();
  i1.GeneratedColumn<String> get key =>
      columnsByName['key']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<String> get json =>
      columnsByName['json']! as i1.GeneratedColumn<String>;
  i1.GeneratedColumn<DateTime> get expireAt =>
      columnsByName['expireAt']! as i1.GeneratedColumn<DateTime>;
  i1.GeneratedColumn<String> get destroyKey =>
      columnsByName['destroyKey']! as i1.GeneratedColumn<String>;
}

i1.GeneratedColumn<String> _column_8(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'json',
      aliasedName,
      false,
      type: i1.DriftSqlType.string,
      $customConstraints: 'NOT NULL',
    );
i1.GeneratedColumn<DateTime> _column_9(String aliasedName) =>
    i1.GeneratedColumn<DateTime>(
      'expireAt',
      aliasedName,
      true,
      type: i1.DriftSqlType.dateTime,
      $customConstraints: '',
    );
i1.GeneratedColumn<String> _column_10(String aliasedName) =>
    i1.GeneratedColumn<String>(
      'destroyKey',
      aliasedName,
      true,
      type: i1.DriftSqlType.string,
      $customConstraints: '',
    );
i0.MigrationStepWithVersion migrationSteps({
  required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2,
}) {
  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;
      default:
        throw ArgumentError.value('Unknown migration from $currentVersion');
    }
  };
}

i1.OnUpgrade stepByStep({
  required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2,
}) => i0.VersionedSchema.stepByStepHelper(
  step: migrationSteps(from1To2: from1To2),
);
