Run melos run build

This commit is contained in:
Abitofevrything 2022-10-29 14:36:50 +02:00
parent 52b885c007
commit 3ec04df46f
6 changed files with 288 additions and 38 deletions

View File

@ -130,8 +130,22 @@ class $TodoCategoriesTable extends TodoCategories
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.mysql: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.postgres: 'PRIMARY KEY AUTOINCREMENT',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, hasAutoIncrement: true);
final VerificationMeta _nameMeta = const VerificationMeta('name');
@override
late final GeneratedColumn<String> name = GeneratedColumn<String>(
@ -368,8 +382,22 @@ class $TodoItemsTable extends TodoItems
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.mysql: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.postgres: 'PRIMARY KEY AUTOINCREMENT',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, hasAutoIncrement: true);
final VerificationMeta _titleMeta = const VerificationMeta('title');
@override
late final GeneratedColumn<String> title = GeneratedColumn<String>(
@ -385,8 +413,22 @@ class $TodoItemsTable extends TodoItems
late final GeneratedColumn<int> categoryId = GeneratedColumn<int>(
'category_id', aliasedName, false,
type: DriftSqlType.int,
requiredDuringInsert: true,
defaultConstraints: 'REFERENCES "todo_categories" ("id")');
requiredDuringInsert: true, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'REFERENCES "todo_categories" ("id")',
SqlDialect.mysql: 'REFERENCES "todo_categories" ("id")',
SqlDialect.postgres: 'REFERENCES "todo_categories" ("id")',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
});
final VerificationMeta _generatedTextMeta =
const VerificationMeta('generatedText');
@override

View File

@ -176,8 +176,22 @@ class $CategoriesTable extends Categories
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.mysql: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.postgres: 'PRIMARY KEY AUTOINCREMENT',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, hasAutoIncrement: true);
final VerificationMeta _descriptionMeta =
const VerificationMeta('description');
@override
@ -467,8 +481,22 @@ class $TodosTableTable extends TodosTable
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.mysql: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.postgres: 'PRIMARY KEY AUTOINCREMENT',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, hasAutoIncrement: true);
final VerificationMeta _titleMeta = const VerificationMeta('title');
@override
late final GeneratedColumn<String> title = GeneratedColumn<String>(
@ -487,15 +515,43 @@ class $TodosTableTable extends TodosTable
late final GeneratedColumn<DateTime> targetDate = GeneratedColumn<DateTime>(
'target_date', aliasedName, true,
type: DriftSqlType.dateTime,
requiredDuringInsert: false,
defaultConstraints: 'UNIQUE');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'UNIQUE',
SqlDialect.mysql: 'UNIQUE',
SqlDialect.postgres: 'UNIQUE',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
});
final VerificationMeta _categoryMeta = const VerificationMeta('category');
@override
late final GeneratedColumn<int> category = GeneratedColumn<int>(
'category', aliasedName, true,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'REFERENCES "categories" ("id")');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'REFERENCES "categories" ("id")',
SqlDialect.mysql: 'REFERENCES "categories" ("id")',
SqlDialect.postgres: 'REFERENCES "categories" ("id")',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
});
@override
List<GeneratedColumn> get $columns =>
[id, title, content, targetDate, category];
@ -760,8 +816,22 @@ class $UsersTable extends Users with TableInfo<$UsersTable, User> {
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.mysql: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.postgres: 'PRIMARY KEY AUTOINCREMENT',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, hasAutoIncrement: true);
final VerificationMeta _nameMeta = const VerificationMeta('name');
@override
late final GeneratedColumn<String> name = GeneratedColumn<String>(
@ -769,16 +839,43 @@ class $UsersTable extends Users with TableInfo<$UsersTable, User> {
additionalChecks:
GeneratedColumn.checkTextLength(minTextLength: 6, maxTextLength: 32),
type: DriftSqlType.string,
requiredDuringInsert: true,
defaultConstraints: 'UNIQUE');
requiredDuringInsert: true, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'UNIQUE',
SqlDialect.mysql: 'UNIQUE',
SqlDialect.postgres: 'UNIQUE',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
});
final VerificationMeta _isAwesomeMeta = const VerificationMeta('isAwesome');
@override
late final GeneratedColumn<bool> isAwesome = GeneratedColumn<bool>(
'is_awesome', aliasedName, false,
type: DriftSqlType.bool,
requiredDuringInsert: false,
defaultConstraints: 'CHECK ("is_awesome" IN (0, 1))',
defaultValue: const Constant(true));
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'CHECK ("is_awesome" IN (0, 1))',
SqlDialect.mysql: 'CHECK ("is_awesome" IN (0, 1))',
SqlDialect.postgres: 'CHECK ("is_awesome" IN (0, 1))',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, defaultValue: const Constant(true));
final VerificationMeta _profilePictureMeta =
const VerificationMeta('profilePicture');
@override

View File

@ -151,8 +151,22 @@ class $CategoriesTable extends Categories
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.mysql: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.postgres: 'PRIMARY KEY AUTOINCREMENT',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, hasAutoIncrement: true);
final VerificationMeta _nameMeta = const VerificationMeta('name');
@override
late final GeneratedColumn<String> name = GeneratedColumn<String>(
@ -388,8 +402,22 @@ class $TodoEntriesTable extends TodoEntries
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.mysql: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.postgres: 'PRIMARY KEY AUTOINCREMENT',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, hasAutoIncrement: true);
final VerificationMeta _descriptionMeta =
const VerificationMeta('description');
@override
@ -401,8 +429,22 @@ class $TodoEntriesTable extends TodoEntries
late final GeneratedColumn<int> category = GeneratedColumn<int>(
'category', aliasedName, true,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'REFERENCES "categories" ("id")');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'REFERENCES "categories" ("id")',
SqlDialect.mysql: 'REFERENCES "categories" ("id")',
SqlDialect.postgres: 'REFERENCES "categories" ("id")',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
});
final VerificationMeta _dueDateMeta = const VerificationMeta('dueDate');
@override
late final GeneratedColumn<DateTime> dueDate = GeneratedColumn<DateTime>(

View File

@ -124,8 +124,22 @@ class $NotesTable extends Notes with TableInfo<$NotesTable, Note> {
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.mysql: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.postgres: 'PRIMARY KEY AUTOINCREMENT',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, hasAutoIncrement: true);
final VerificationMeta _contentMeta = const VerificationMeta('content');
@override
late final GeneratedColumn<String> content = GeneratedColumn<String>(

View File

@ -219,8 +219,22 @@ class $UsersTable extends Users with TableInfo<$UsersTable, User> {
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.mysql: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.postgres: 'PRIMARY KEY AUTOINCREMENT',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, hasAutoIncrement: true);
final VerificationMeta _nameMeta = const VerificationMeta('name');
@override
late final GeneratedColumn<String> name = GeneratedColumn<String>(
@ -473,9 +487,22 @@ class $FriendshipsTable extends Friendships
late final GeneratedColumn<bool> reallyGoodFriends = GeneratedColumn<bool>(
'really_good_friends', aliasedName, false,
type: DriftSqlType.bool,
requiredDuringInsert: false,
defaultConstraints: 'CHECK ("really_good_friends" IN (0, 1))',
defaultValue: const Constant(false));
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'CHECK ("really_good_friends" IN (0, 1))',
SqlDialect.mysql: 'CHECK ("really_good_friends" IN (0, 1))',
SqlDialect.postgres: 'CHECK ("really_good_friends" IN (0, 1))',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, defaultValue: const Constant(false));
@override
List<GeneratedColumn> get $columns =>
[firstUser, secondUser, reallyGoodFriends];

View File

@ -106,8 +106,22 @@ class $FoosTable extends Foos with TableInfo<$FoosTable, Foo> {
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.mysql: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.postgres: 'PRIMARY KEY AUTOINCREMENT',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, hasAutoIncrement: true);
@override
List<GeneratedColumn> get $columns => [id];
@override
@ -241,8 +255,22 @@ class $BarsTable extends Bars with TableInfo<$BarsTable, Bar> {
late final GeneratedColumn<int> id = GeneratedColumn<int>(
'id', aliasedName, false,
type: DriftSqlType.int,
requiredDuringInsert: false,
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
requiredDuringInsert: false, defaultConstraints: (context) {
const dialectConstraints = {
SqlDialect.sqlite: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.mysql: 'PRIMARY KEY AUTOINCREMENT',
SqlDialect.postgres: 'PRIMARY KEY AUTOINCREMENT',
};
final constraints = dialectConstraints[context.dialect]!;
if (constraints.isEmpty) {
return;
}
context.buffer
..write(' ')
..write(constraints);
}, hasAutoIncrement: true);
@override
List<GeneratedColumn> get $columns => [id];
@override