Expand LotType from {seed, plant} to six append-only forms (seed,
seedling, plant, tree, bulb, cutting) and add an optional Presentation
attribute (pot/tray/plug/bareRoot/rootBall) kept separate from quantity
so 'how many' and 'in what packaging' never conflate.
Add attachments.sortOrder so the cover photo is the lowest-ordered one,
enabling reordering from the full-screen viewer. Expand QuantityKind
with the new plant-aware forms.
Migrations are additive (v1→v5 all covered by migration_test); enum
values are stored by name and appended only, keeping CRDT sync safe.
1408 lines
38 KiB
Dart
1408 lines
38 KiB
Dart
// dart format width=80
|
|
import 'dart:typed_data' as i2;
|
|
// GENERATED BY drift_dev, DO NOT MODIFY.
|
|
// ignore_for_file: type=lint,unused_import
|
|
//
|
|
import 'package:drift/drift.dart';
|
|
|
|
class Varieties extends Table with TableInfo {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
Varieties(this.attachedDatabase, [this._alias]);
|
|
late final GeneratedColumn<String> id = GeneratedColumn<String>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> createdAt = GeneratedColumn<int>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
|
|
'updated_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> lastAuthor = GeneratedColumn<String>(
|
|
'last_author',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> isDeleted = GeneratedColumn<int>(
|
|
'is_deleted',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_deleted IN (0, 1))',
|
|
defaultValue: const CustomExpression('0'),
|
|
);
|
|
late final GeneratedColumn<int> schemaRowVersion = GeneratedColumn<int>(
|
|
'schema_row_version',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 1',
|
|
defaultValue: const CustomExpression('1'),
|
|
);
|
|
late final GeneratedColumn<String> label = GeneratedColumn<String>(
|
|
'label',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> speciesId = GeneratedColumn<String>(
|
|
'species_id',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> cultivarName = GeneratedColumn<String>(
|
|
'cultivar_name',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> category = GeneratedColumn<String>(
|
|
'category',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> notes = GeneratedColumn<String>(
|
|
'notes',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
createdAt,
|
|
updatedAt,
|
|
lastAuthor,
|
|
isDeleted,
|
|
schemaRowVersion,
|
|
label,
|
|
speciesId,
|
|
cultivarName,
|
|
category,
|
|
notes,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'varieties';
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Never map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
throw UnsupportedError('TableInfo.map in schema verification code');
|
|
}
|
|
|
|
@override
|
|
Varieties createAlias(String alias) {
|
|
return Varieties(attachedDatabase, alias);
|
|
}
|
|
|
|
@override
|
|
List<String> get customConstraints => const ['PRIMARY KEY(id)'];
|
|
@override
|
|
bool get dontWriteConstraints => true;
|
|
}
|
|
|
|
class VarietyVernacularNames extends Table with TableInfo {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
VarietyVernacularNames(this.attachedDatabase, [this._alias]);
|
|
late final GeneratedColumn<String> id = GeneratedColumn<String>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> createdAt = GeneratedColumn<int>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
|
|
'updated_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> lastAuthor = GeneratedColumn<String>(
|
|
'last_author',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> isDeleted = GeneratedColumn<int>(
|
|
'is_deleted',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_deleted IN (0, 1))',
|
|
defaultValue: const CustomExpression('0'),
|
|
);
|
|
late final GeneratedColumn<int> schemaRowVersion = GeneratedColumn<int>(
|
|
'schema_row_version',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 1',
|
|
defaultValue: const CustomExpression('1'),
|
|
);
|
|
late final GeneratedColumn<String> varietyId = GeneratedColumn<String>(
|
|
'variety_id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> name = GeneratedColumn<String>(
|
|
'name',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> language = GeneratedColumn<String>(
|
|
'language',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> region = GeneratedColumn<String>(
|
|
'region',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
createdAt,
|
|
updatedAt,
|
|
lastAuthor,
|
|
isDeleted,
|
|
schemaRowVersion,
|
|
varietyId,
|
|
name,
|
|
language,
|
|
region,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'variety_vernacular_names';
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Never map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
throw UnsupportedError('TableInfo.map in schema verification code');
|
|
}
|
|
|
|
@override
|
|
VarietyVernacularNames createAlias(String alias) {
|
|
return VarietyVernacularNames(attachedDatabase, alias);
|
|
}
|
|
|
|
@override
|
|
List<String> get customConstraints => const ['PRIMARY KEY(id)'];
|
|
@override
|
|
bool get dontWriteConstraints => true;
|
|
}
|
|
|
|
class Species extends Table with TableInfo {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
Species(this.attachedDatabase, [this._alias]);
|
|
late final GeneratedColumn<String> id = GeneratedColumn<String>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> createdAt = GeneratedColumn<int>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
|
|
'updated_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> lastAuthor = GeneratedColumn<String>(
|
|
'last_author',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> isDeleted = GeneratedColumn<int>(
|
|
'is_deleted',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_deleted IN (0, 1))',
|
|
defaultValue: const CustomExpression('0'),
|
|
);
|
|
late final GeneratedColumn<int> schemaRowVersion = GeneratedColumn<int>(
|
|
'schema_row_version',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 1',
|
|
defaultValue: const CustomExpression('1'),
|
|
);
|
|
late final GeneratedColumn<String> scientificName = GeneratedColumn<String>(
|
|
'scientific_name',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> wikidataQid = GeneratedColumn<String>(
|
|
'wikidata_qid',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<int> gbifKey = GeneratedColumn<int>(
|
|
'gbif_key',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> family = GeneratedColumn<String>(
|
|
'family',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<int> isBundled = GeneratedColumn<int>(
|
|
'is_bundled',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_bundled IN (0, 1))',
|
|
defaultValue: const CustomExpression('0'),
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
createdAt,
|
|
updatedAt,
|
|
lastAuthor,
|
|
isDeleted,
|
|
schemaRowVersion,
|
|
scientificName,
|
|
wikidataQid,
|
|
gbifKey,
|
|
family,
|
|
isBundled,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'species';
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Never map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
throw UnsupportedError('TableInfo.map in schema verification code');
|
|
}
|
|
|
|
@override
|
|
Species createAlias(String alias) {
|
|
return Species(attachedDatabase, alias);
|
|
}
|
|
|
|
@override
|
|
List<String> get customConstraints => const ['PRIMARY KEY(id)'];
|
|
@override
|
|
bool get dontWriteConstraints => true;
|
|
}
|
|
|
|
class SpeciesCommonNames extends Table with TableInfo {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
SpeciesCommonNames(this.attachedDatabase, [this._alias]);
|
|
late final GeneratedColumn<String> id = GeneratedColumn<String>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> createdAt = GeneratedColumn<int>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
|
|
'updated_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> lastAuthor = GeneratedColumn<String>(
|
|
'last_author',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> isDeleted = GeneratedColumn<int>(
|
|
'is_deleted',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_deleted IN (0, 1))',
|
|
defaultValue: const CustomExpression('0'),
|
|
);
|
|
late final GeneratedColumn<int> schemaRowVersion = GeneratedColumn<int>(
|
|
'schema_row_version',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 1',
|
|
defaultValue: const CustomExpression('1'),
|
|
);
|
|
late final GeneratedColumn<String> speciesId = GeneratedColumn<String>(
|
|
'species_id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> name = GeneratedColumn<String>(
|
|
'name',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> language = GeneratedColumn<String>(
|
|
'language',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
createdAt,
|
|
updatedAt,
|
|
lastAuthor,
|
|
isDeleted,
|
|
schemaRowVersion,
|
|
speciesId,
|
|
name,
|
|
language,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'species_common_names';
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Never map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
throw UnsupportedError('TableInfo.map in schema verification code');
|
|
}
|
|
|
|
@override
|
|
SpeciesCommonNames createAlias(String alias) {
|
|
return SpeciesCommonNames(attachedDatabase, alias);
|
|
}
|
|
|
|
@override
|
|
List<String> get customConstraints => const ['PRIMARY KEY(id)'];
|
|
@override
|
|
bool get dontWriteConstraints => true;
|
|
}
|
|
|
|
class Lots extends Table with TableInfo {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
Lots(this.attachedDatabase, [this._alias]);
|
|
late final GeneratedColumn<String> id = GeneratedColumn<String>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> createdAt = GeneratedColumn<int>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
|
|
'updated_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> lastAuthor = GeneratedColumn<String>(
|
|
'last_author',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> isDeleted = GeneratedColumn<int>(
|
|
'is_deleted',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_deleted IN (0, 1))',
|
|
defaultValue: const CustomExpression('0'),
|
|
);
|
|
late final GeneratedColumn<int> schemaRowVersion = GeneratedColumn<int>(
|
|
'schema_row_version',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 1',
|
|
defaultValue: const CustomExpression('1'),
|
|
);
|
|
late final GeneratedColumn<String> varietyId = GeneratedColumn<String>(
|
|
'variety_id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> type = GeneratedColumn<String>(
|
|
'type',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT \'seed\'',
|
|
defaultValue: const CustomExpression('\'seed\''),
|
|
);
|
|
late final GeneratedColumn<int> harvestYear = GeneratedColumn<int>(
|
|
'harvest_year',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<int> harvestMonth = GeneratedColumn<int>(
|
|
'harvest_month',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> quantityKind = GeneratedColumn<String>(
|
|
'quantity_kind',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<double> quantityPrecise = GeneratedColumn<double>(
|
|
'quantity_precise',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.double,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> quantityLabel = GeneratedColumn<String>(
|
|
'quantity_label',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> presentation = GeneratedColumn<String>(
|
|
'presentation',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> storageLocation = GeneratedColumn<String>(
|
|
'storage_location',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> offerStatus = GeneratedColumn<String>(
|
|
'offer_status',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT \'private\'',
|
|
defaultValue: const CustomExpression('\'private\''),
|
|
);
|
|
late final GeneratedColumn<String> seedbankId = GeneratedColumn<String>(
|
|
'seedbank_id',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
createdAt,
|
|
updatedAt,
|
|
lastAuthor,
|
|
isDeleted,
|
|
schemaRowVersion,
|
|
varietyId,
|
|
type,
|
|
harvestYear,
|
|
harvestMonth,
|
|
quantityKind,
|
|
quantityPrecise,
|
|
quantityLabel,
|
|
presentation,
|
|
storageLocation,
|
|
offerStatus,
|
|
seedbankId,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'lots';
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Never map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
throw UnsupportedError('TableInfo.map in schema verification code');
|
|
}
|
|
|
|
@override
|
|
Lots createAlias(String alias) {
|
|
return Lots(attachedDatabase, alias);
|
|
}
|
|
|
|
@override
|
|
List<String> get customConstraints => const ['PRIMARY KEY(id)'];
|
|
@override
|
|
bool get dontWriteConstraints => true;
|
|
}
|
|
|
|
class GerminationTests extends Table with TableInfo {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
GerminationTests(this.attachedDatabase, [this._alias]);
|
|
late final GeneratedColumn<String> id = GeneratedColumn<String>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> createdAt = GeneratedColumn<int>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
|
|
'updated_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> lastAuthor = GeneratedColumn<String>(
|
|
'last_author',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> isDeleted = GeneratedColumn<int>(
|
|
'is_deleted',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_deleted IN (0, 1))',
|
|
defaultValue: const CustomExpression('0'),
|
|
);
|
|
late final GeneratedColumn<int> schemaRowVersion = GeneratedColumn<int>(
|
|
'schema_row_version',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 1',
|
|
defaultValue: const CustomExpression('1'),
|
|
);
|
|
late final GeneratedColumn<String> lotId = GeneratedColumn<String>(
|
|
'lot_id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> testedOn = GeneratedColumn<int>(
|
|
'tested_on',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<int> sampleSize = GeneratedColumn<int>(
|
|
'sample_size',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<int> germinatedCount = GeneratedColumn<int>(
|
|
'germinated_count',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> notes = GeneratedColumn<String>(
|
|
'notes',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
createdAt,
|
|
updatedAt,
|
|
lastAuthor,
|
|
isDeleted,
|
|
schemaRowVersion,
|
|
lotId,
|
|
testedOn,
|
|
sampleSize,
|
|
germinatedCount,
|
|
notes,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'germination_tests';
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Never map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
throw UnsupportedError('TableInfo.map in schema verification code');
|
|
}
|
|
|
|
@override
|
|
GerminationTests createAlias(String alias) {
|
|
return GerminationTests(attachedDatabase, alias);
|
|
}
|
|
|
|
@override
|
|
List<String> get customConstraints => const ['PRIMARY KEY(id)'];
|
|
@override
|
|
bool get dontWriteConstraints => true;
|
|
}
|
|
|
|
class Movements extends Table with TableInfo {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
Movements(this.attachedDatabase, [this._alias]);
|
|
late final GeneratedColumn<String> id = GeneratedColumn<String>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> createdAt = GeneratedColumn<int>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> lastAuthor = GeneratedColumn<String>(
|
|
'last_author',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> schemaRowVersion = GeneratedColumn<int>(
|
|
'schema_row_version',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 1',
|
|
defaultValue: const CustomExpression('1'),
|
|
);
|
|
late final GeneratedColumn<String> lotId = GeneratedColumn<String>(
|
|
'lot_id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> type = GeneratedColumn<String>(
|
|
'type',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> occurredOn = GeneratedColumn<int>(
|
|
'occurred_on',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> counterpartyId = GeneratedColumn<String>(
|
|
'counterparty_id',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> quantityKind = GeneratedColumn<String>(
|
|
'quantity_kind',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<double> quantityPrecise = GeneratedColumn<double>(
|
|
'quantity_precise',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.double,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> quantityLabel = GeneratedColumn<String>(
|
|
'quantity_label',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> parentMovementId = GeneratedColumn<String>(
|
|
'parent_movement_id',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> plantareId = GeneratedColumn<String>(
|
|
'plantare_id',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> notes = GeneratedColumn<String>(
|
|
'notes',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
createdAt,
|
|
lastAuthor,
|
|
schemaRowVersion,
|
|
lotId,
|
|
type,
|
|
occurredOn,
|
|
counterpartyId,
|
|
quantityKind,
|
|
quantityPrecise,
|
|
quantityLabel,
|
|
parentMovementId,
|
|
plantareId,
|
|
notes,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'movements';
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Never map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
throw UnsupportedError('TableInfo.map in schema verification code');
|
|
}
|
|
|
|
@override
|
|
Movements createAlias(String alias) {
|
|
return Movements(attachedDatabase, alias);
|
|
}
|
|
|
|
@override
|
|
List<String> get customConstraints => const ['PRIMARY KEY(id)'];
|
|
@override
|
|
bool get dontWriteConstraints => true;
|
|
}
|
|
|
|
class Parties extends Table with TableInfo {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
Parties(this.attachedDatabase, [this._alias]);
|
|
late final GeneratedColumn<String> id = GeneratedColumn<String>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> createdAt = GeneratedColumn<int>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
|
|
'updated_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> lastAuthor = GeneratedColumn<String>(
|
|
'last_author',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> isDeleted = GeneratedColumn<int>(
|
|
'is_deleted',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_deleted IN (0, 1))',
|
|
defaultValue: const CustomExpression('0'),
|
|
);
|
|
late final GeneratedColumn<int> schemaRowVersion = GeneratedColumn<int>(
|
|
'schema_row_version',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 1',
|
|
defaultValue: const CustomExpression('1'),
|
|
);
|
|
late final GeneratedColumn<String> displayName = GeneratedColumn<String>(
|
|
'display_name',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> publicKey = GeneratedColumn<String>(
|
|
'public_key',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> kind = GeneratedColumn<String>(
|
|
'kind',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT \'person\'',
|
|
defaultValue: const CustomExpression('\'person\''),
|
|
);
|
|
late final GeneratedColumn<String> note = GeneratedColumn<String>(
|
|
'note',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
createdAt,
|
|
updatedAt,
|
|
lastAuthor,
|
|
isDeleted,
|
|
schemaRowVersion,
|
|
displayName,
|
|
publicKey,
|
|
kind,
|
|
note,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'parties';
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Never map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
throw UnsupportedError('TableInfo.map in schema verification code');
|
|
}
|
|
|
|
@override
|
|
Parties createAlias(String alias) {
|
|
return Parties(attachedDatabase, alias);
|
|
}
|
|
|
|
@override
|
|
List<String> get customConstraints => const ['PRIMARY KEY(id)'];
|
|
@override
|
|
bool get dontWriteConstraints => true;
|
|
}
|
|
|
|
class Attachments extends Table with TableInfo {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
Attachments(this.attachedDatabase, [this._alias]);
|
|
late final GeneratedColumn<String> id = GeneratedColumn<String>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> createdAt = GeneratedColumn<int>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
|
|
'updated_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> lastAuthor = GeneratedColumn<String>(
|
|
'last_author',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> isDeleted = GeneratedColumn<int>(
|
|
'is_deleted',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_deleted IN (0, 1))',
|
|
defaultValue: const CustomExpression('0'),
|
|
);
|
|
late final GeneratedColumn<int> schemaRowVersion = GeneratedColumn<int>(
|
|
'schema_row_version',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 1',
|
|
defaultValue: const CustomExpression('1'),
|
|
);
|
|
late final GeneratedColumn<String> parentType = GeneratedColumn<String>(
|
|
'parent_type',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> parentId = GeneratedColumn<String>(
|
|
'parent_id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> kind = GeneratedColumn<String>(
|
|
'kind',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> uri = GeneratedColumn<String>(
|
|
'uri',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<i2.Uint8List> bytes =
|
|
GeneratedColumn<i2.Uint8List>(
|
|
'bytes',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.blob,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
late final GeneratedColumn<String> mimeType = GeneratedColumn<String>(
|
|
'mime_type',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
createdAt,
|
|
updatedAt,
|
|
lastAuthor,
|
|
isDeleted,
|
|
schemaRowVersion,
|
|
parentType,
|
|
parentId,
|
|
kind,
|
|
uri,
|
|
bytes,
|
|
mimeType,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'attachments';
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Never map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
throw UnsupportedError('TableInfo.map in schema verification code');
|
|
}
|
|
|
|
@override
|
|
Attachments createAlias(String alias) {
|
|
return Attachments(attachedDatabase, alias);
|
|
}
|
|
|
|
@override
|
|
List<String> get customConstraints => const ['PRIMARY KEY(id)'];
|
|
@override
|
|
bool get dontWriteConstraints => true;
|
|
}
|
|
|
|
class ExternalLinks extends Table with TableInfo {
|
|
@override
|
|
final GeneratedDatabase attachedDatabase;
|
|
final String? _alias;
|
|
ExternalLinks(this.attachedDatabase, [this._alias]);
|
|
late final GeneratedColumn<String> id = GeneratedColumn<String>(
|
|
'id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> createdAt = GeneratedColumn<int>(
|
|
'created_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
|
|
'updated_at',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> lastAuthor = GeneratedColumn<String>(
|
|
'last_author',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<int> isDeleted = GeneratedColumn<int>(
|
|
'is_deleted',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_deleted IN (0, 1))',
|
|
defaultValue: const CustomExpression('0'),
|
|
);
|
|
late final GeneratedColumn<int> schemaRowVersion = GeneratedColumn<int>(
|
|
'schema_row_version',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NOT NULL DEFAULT 1',
|
|
defaultValue: const CustomExpression('1'),
|
|
);
|
|
late final GeneratedColumn<String> parentType = GeneratedColumn<String>(
|
|
'parent_type',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> parentId = GeneratedColumn<String>(
|
|
'parent_id',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> url = GeneratedColumn<String>(
|
|
'url',
|
|
aliasedName,
|
|
false,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: true,
|
|
$customConstraints: 'NOT NULL',
|
|
);
|
|
late final GeneratedColumn<String> title = GeneratedColumn<String>(
|
|
'title',
|
|
aliasedName,
|
|
true,
|
|
type: DriftSqlType.string,
|
|
requiredDuringInsert: false,
|
|
$customConstraints: 'NULL',
|
|
);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [
|
|
id,
|
|
createdAt,
|
|
updatedAt,
|
|
lastAuthor,
|
|
isDeleted,
|
|
schemaRowVersion,
|
|
parentType,
|
|
parentId,
|
|
url,
|
|
title,
|
|
];
|
|
@override
|
|
String get aliasedName => _alias ?? actualTableName;
|
|
@override
|
|
String get actualTableName => $name;
|
|
static const String $name = 'external_links';
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Never map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
throw UnsupportedError('TableInfo.map in schema verification code');
|
|
}
|
|
|
|
@override
|
|
ExternalLinks createAlias(String alias) {
|
|
return ExternalLinks(attachedDatabase, alias);
|
|
}
|
|
|
|
@override
|
|
List<String> get customConstraints => const ['PRIMARY KEY(id)'];
|
|
@override
|
|
bool get dontWriteConstraints => true;
|
|
}
|
|
|
|
class DatabaseAtV4 extends GeneratedDatabase {
|
|
DatabaseAtV4(QueryExecutor e) : super(e);
|
|
late final Varieties varieties = Varieties(this);
|
|
late final VarietyVernacularNames varietyVernacularNames =
|
|
VarietyVernacularNames(this);
|
|
late final Species species = Species(this);
|
|
late final SpeciesCommonNames speciesCommonNames = SpeciesCommonNames(this);
|
|
late final Lots lots = Lots(this);
|
|
late final GerminationTests germinationTests = GerminationTests(this);
|
|
late final Movements movements = Movements(this);
|
|
late final Parties parties = Parties(this);
|
|
late final Attachments attachments = Attachments(this);
|
|
late final ExternalLinks externalLinks = ExternalLinks(this);
|
|
@override
|
|
Iterable<TableInfo<Table, Object?>> get allTables =>
|
|
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
|
|
@override
|
|
List<DatabaseSchemaEntity> get allSchemaEntities => [
|
|
varieties,
|
|
varietyVernacularNames,
|
|
species,
|
|
speciesCommonNames,
|
|
lots,
|
|
germinationTests,
|
|
movements,
|
|
parties,
|
|
attachments,
|
|
externalLinks,
|
|
];
|
|
@override
|
|
int get schemaVersion => 4;
|
|
}
|