fixes
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Admin Panel / Deploy Admin Panel (push) Waiting to run
Deploy Admin Panel / Admin Panel Verification (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Admin Panel / Deploy Admin Panel (push) Waiting to run
Deploy Admin Panel / Admin Panel Verification (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
This commit is contained in:
parent
7c1e2bcaf7
commit
8ce8569625
13 changed files with 62 additions and 101 deletions
|
|
@ -34,7 +34,6 @@ import {
|
||||||
AlertDialogTitle,
|
AlertDialogTitle,
|
||||||
} from '@/components/ui/alert-dialog'
|
} from '@/components/ui/alert-dialog'
|
||||||
import { Label } from '@/components/ui/label'
|
import { Label } from '@/components/ui/label'
|
||||||
import { Textarea } from '@/components/ui/textarea'
|
|
||||||
import { ImageUpload } from '@/components/ui/image-upload'
|
import { ImageUpload } from '@/components/ui/image-upload'
|
||||||
import { Plus, Search, Edit, Trash2, ChevronLeft, ChevronRight } from 'lucide-react'
|
import { Plus, Search, Edit, Trash2, ChevronLeft, ChevronRight } from 'lucide-react'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -200,8 +200,8 @@ class AppDatabase extends _$AppDatabase {
|
||||||
|
|
||||||
// Users indexes
|
// Users indexes
|
||||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_users_email ON users(email) WHERE email IS NOT NULL');
|
await customStatement('CREATE INDEX IF NOT EXISTS idx_users_email ON users(email) WHERE email IS NOT NULL');
|
||||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_users_admin ON users(admin) WHERE admin = true');
|
await customStatement('CREATE INDEX IF NOT EXISTS idx_users_admin ON users(admin) WHERE admin = TRUE');
|
||||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_users_not_deleted ON users(is_deleted) WHERE is_deleted = false');
|
await customStatement('CREATE INDEX IF NOT EXISTS idx_users_not_deleted ON users(is_deleted) WHERE is_deleted = FALSE');
|
||||||
|
|
||||||
// UserDatas indexes
|
// UserDatas indexes
|
||||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_user_datas_user_id ON user_datas(user_id)');
|
await customStatement('CREATE INDEX IF NOT EXISTS idx_user_datas_user_id ON user_datas(user_id)');
|
||||||
|
|
@ -213,12 +213,12 @@ class AppDatabase extends _$AppDatabase {
|
||||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_tokens_expires ON tokens(expires)');
|
await customStatement('CREATE INDEX IF NOT EXISTS idx_tokens_expires ON tokens(expires)');
|
||||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_refresh_tokens_user_id ON refresh_tokens(user_id)');
|
await customStatement('CREATE INDEX IF NOT EXISTS idx_refresh_tokens_user_id ON refresh_tokens(user_id)');
|
||||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_refresh_tokens_jti ON refresh_tokens(jti)');
|
await customStatement('CREATE INDEX IF NOT EXISTS idx_refresh_tokens_jti ON refresh_tokens(jti)');
|
||||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_refresh_tokens_not_blacklisted ON refresh_tokens(is_blacklisted) WHERE is_blacklisted = false');
|
await customStatement('CREATE INDEX IF NOT EXISTS idx_refresh_tokens_not_blacklisted ON refresh_tokens(is_blacklisted) WHERE is_blacklisted = FALSE');
|
||||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_telegram_codes_code ON telegram_auth_codes(code)');
|
await customStatement('CREATE INDEX IF NOT EXISTS idx_telegram_codes_code ON telegram_auth_codes(code)');
|
||||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_telegram_codes_not_used ON telegram_auth_codes(is_used) WHERE is_used = false');
|
await customStatement('CREATE INDEX IF NOT EXISTS idx_telegram_codes_not_used ON telegram_auth_codes(is_used) WHERE is_used = FALSE');
|
||||||
|
|
||||||
// CardPacks indexes
|
// CardPacks indexes
|
||||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_packs_enabled ON card_packs(enabled) WHERE enabled = true');
|
await customStatement('CREATE INDEX IF NOT EXISTS idx_packs_enabled ON card_packs(enabled) WHERE enabled = TRUE');
|
||||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_packs_order ON card_packs("order")');
|
await customStatement('CREATE INDEX IF NOT EXISTS idx_packs_order ON card_packs("order")');
|
||||||
|
|
||||||
// GameCards indexes
|
// GameCards indexes
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,8 @@ class $UsersTable extends Users with TableInfo<$UsersTable, User> {
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("admin" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _userSettingsMeta = const VerificationMeta(
|
static const VerificationMeta _userSettingsMeta = const VerificationMeta(
|
||||||
'userSettings',
|
'userSettings',
|
||||||
|
|
@ -118,10 +116,8 @@ class $UsersTable extends Users with TableInfo<$UsersTable, User> {
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
List<GeneratedColumn> get $columns => [
|
List<GeneratedColumn> get $columns => [
|
||||||
|
|
@ -1524,10 +1520,8 @@ class $TokensTable extends Tokens with TableInfo<$TokensTable, Token> {
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
||||||
'deletedAt',
|
'deletedAt',
|
||||||
|
|
@ -2024,10 +2018,8 @@ class $RefreshTokensTable extends RefreshTokens
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_blacklisted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _createdAtMeta = const VerificationMeta(
|
static const VerificationMeta _createdAtMeta = const VerificationMeta(
|
||||||
'createdAt',
|
'createdAt',
|
||||||
|
|
@ -2064,10 +2056,8 @@ class $RefreshTokensTable extends RefreshTokens
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
||||||
'deletedAt',
|
'deletedAt',
|
||||||
|
|
@ -2638,10 +2628,8 @@ class $TelegramAuthCodesTable extends TelegramAuthCodes
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
||||||
'deletedAt',
|
'deletedAt',
|
||||||
|
|
@ -3358,10 +3346,8 @@ class $CardPacksTable extends CardPacks
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT TRUE',
|
||||||
'CHECK ("enabled" IN (0, 1))',
|
defaultValue: const CustomExpression('TRUE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(true),
|
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
late final GeneratedColumnWithTypeConverter<List<String>, String> cardsOrder =
|
late final GeneratedColumnWithTypeConverter<List<String>, String> cardsOrder =
|
||||||
|
|
@ -3463,10 +3449,8 @@ class $CardPacksTable extends CardPacks
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
List<GeneratedColumn> get $columns => [
|
List<GeneratedColumn> get $columns => [
|
||||||
|
|
@ -4447,10 +4431,8 @@ class $GameCardsTable extends GameCards
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
List<GeneratedColumn> get $columns => [
|
List<GeneratedColumn> get $columns => [
|
||||||
|
|
@ -6602,10 +6584,8 @@ class $SubscriptionPlansTable extends SubscriptionPlans
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
List<GeneratedColumn> get $columns => [
|
List<GeneratedColumn> get $columns => [
|
||||||
|
|
@ -7768,10 +7748,8 @@ class $PaymentsTable extends Payments with TableInfo<$PaymentsTable, Payment> {
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
||||||
'deletedAt',
|
'deletedAt',
|
||||||
|
|
@ -8557,10 +8535,8 @@ class $TestsTable extends Tests with TableInfo<$TestsTable, Test> {
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
||||||
'deletedAt',
|
'deletedAt',
|
||||||
|
|
@ -9204,10 +9180,8 @@ class $TestQuestionsTable extends TestQuestions
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
||||||
'deletedAt',
|
'deletedAt',
|
||||||
|
|
@ -12953,10 +12927,8 @@ class $PromoCodesCampaignsTable extends PromoCodesCampaigns
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
||||||
'deletedAt',
|
'deletedAt',
|
||||||
|
|
@ -13782,10 +13754,8 @@ class $PromoCodesTable extends PromoCodes
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
||||||
'deletedAt',
|
'deletedAt',
|
||||||
|
|
@ -14366,10 +14336,8 @@ class $DiscountCampaignsTable extends DiscountCampaigns
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
||||||
'deletedAt',
|
'deletedAt',
|
||||||
|
|
@ -14979,10 +14947,8 @@ class $DiscountsTable extends Discounts
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
||||||
'deletedAt',
|
'deletedAt',
|
||||||
|
|
@ -15866,10 +15832,8 @@ class $StudySessionsTable extends StudySessions
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
||||||
'deletedAt',
|
'deletedAt',
|
||||||
|
|
@ -16685,10 +16649,8 @@ class $WordStatisticsTable extends WordStatistics
|
||||||
false,
|
false,
|
||||||
type: DriftSqlType.bool,
|
type: DriftSqlType.bool,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||||
'CHECK ("is_deleted" IN (0, 1))',
|
defaultValue: const CustomExpression('FALSE'),
|
||||||
),
|
|
||||||
defaultValue: const Constant(false),
|
|
||||||
);
|
);
|
||||||
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
static const VerificationMeta _deletedAtMeta = const VerificationMeta(
|
||||||
'deletedAt',
|
'deletedAt',
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class Tokens extends Table {
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
Column<PgDateTime> get expires => customType(PgTypes.timestampWithTimezone)();
|
Column<PgDateTime> get expires => customType(PgTypes.timestampWithTimezone)();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.nullable()();
|
.nullable()();
|
||||||
|
|
||||||
|
|
@ -42,13 +42,13 @@ class RefreshTokens extends Table {
|
||||||
TextColumn get jti => text().unique()(); // JWT ID
|
TextColumn get jti => text().unique()(); // JWT ID
|
||||||
|
|
||||||
BoolColumn get isBlacklisted => boolean()
|
BoolColumn get isBlacklisted => boolean()
|
||||||
.withDefault(const Constant(false))(); // PostgreSQL использует нативный BOOLEAN
|
.customConstraint('NOT NULL DEFAULT FALSE')(); // PostgreSQL использует нативный BOOLEAN
|
||||||
|
|
||||||
Column<PgDateTime> get createdAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get createdAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
Column<PgDateTime> get expiresAt => customType(PgTypes.timestampWithTimezone)();
|
Column<PgDateTime> get expiresAt => customType(PgTypes.timestampWithTimezone)();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.nullable()();
|
.nullable()();
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ class TelegramAuthCodes extends Table {
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
Column<PgDateTime> get expiresAt => customType(PgTypes.timestampWithTimezone)();
|
Column<PgDateTime> get expiresAt => customType(PgTypes.timestampWithTimezone)();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.nullable()();
|
.nullable()();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class DiscountCampaigns extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
// PostgreSQL использует нативный BOOLEAN
|
// PostgreSQL использует нативный BOOLEAN
|
||||||
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.nullable()();
|
.nullable()();
|
||||||
|
|
@ -59,7 +59,7 @@ class Discounts extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
// PostgreSQL использует нативный BOOLEAN
|
// PostgreSQL использует нативный BOOLEAN
|
||||||
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.nullable()();
|
.nullable()();
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class CardPacks extends Table {
|
||||||
TextColumn get version => text().nullable()();
|
TextColumn get version => text().nullable()();
|
||||||
IntColumn get order => integer().withDefault(const Constant(0))();
|
IntColumn get order => integer().withDefault(const Constant(0))();
|
||||||
BoolColumn get enabled => boolean()
|
BoolColumn get enabled => boolean()
|
||||||
.withDefault(const Constant(true))();
|
.customConstraint('NOT NULL DEFAULT TRUE')();
|
||||||
// PostgreSQL использует нативный BOOLEAN
|
// PostgreSQL использует нативный BOOLEAN
|
||||||
|
|
||||||
// Порядок карточек (JSON array of IDs)
|
// Порядок карточек (JSON array of IDs)
|
||||||
|
|
@ -45,7 +45,7 @@ class CardPacks extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
// PostgreSQL использует нативный BOOLEAN
|
// PostgreSQL использует нативный BOOLEAN
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -81,7 +81,7 @@ class GameCards extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
// PostgreSQL использует нативный BOOLEAN
|
// PostgreSQL использует нативный BOOLEAN
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class Payments extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
|
|
||||||
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.nullable()();
|
.nullable()();
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class PromoCodesCampaigns extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
// PostgreSQL использует нативный BOOLEAN
|
// PostgreSQL использует нативный BOOLEAN
|
||||||
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.nullable()();
|
.nullable()();
|
||||||
|
|
@ -69,7 +69,7 @@ class PromoCodes extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
|
|
||||||
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.nullable()();
|
.nullable()();
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class StudySessions extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
|
|
||||||
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.nullable()();
|
.nullable()();
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ class SubscriptionPlans extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
// PostgreSQL использует нативный BOOLEAN
|
// PostgreSQL использует нативный BOOLEAN
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class Tests extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
// PostgreSQL использует нативный BOOLEAN
|
// PostgreSQL использует нативный BOOLEAN
|
||||||
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.nullable()();
|
.nullable()();
|
||||||
|
|
@ -49,7 +49,7 @@ class TestQuestions extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
|
|
||||||
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.nullable()();
|
.nullable()();
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ class Users extends Table {
|
||||||
TextColumn get name => text().nullable()();
|
TextColumn get name => text().nullable()();
|
||||||
TextColumn get email => text().nullable()();
|
TextColumn get email => text().nullable()();
|
||||||
BoolColumn get admin => boolean()
|
BoolColumn get admin => boolean()
|
||||||
.withDefault(const Constant(false))(); // PostgreSQL использует нативный BOOLEAN
|
.customConstraint('NOT NULL DEFAULT FALSE')(); // PostgreSQL использует нативный BOOLEAN
|
||||||
|
|
||||||
// UserSettings (JSON)
|
// UserSettings (JSON)
|
||||||
TextColumn get userSettings => text().nullable()();
|
TextColumn get userSettings => text().nullable()();
|
||||||
|
|
@ -28,7 +28,7 @@ class Users extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))(); // PostgreSQL использует нативный BOOLEAN
|
.customConstraint('NOT NULL DEFAULT FALSE')(); // PostgreSQL использует нативный BOOLEAN
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Set<Column> get primaryKey => {id};
|
Set<Column> get primaryKey => {id};
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class WordStatistics extends Table {
|
||||||
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get updatedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.withDefault(now())();
|
.withDefault(now())();
|
||||||
BoolColumn get isDeleted => boolean()
|
BoolColumn get isDeleted => boolean()
|
||||||
.withDefault(const Constant(false))();
|
.customConstraint('NOT NULL DEFAULT FALSE')();
|
||||||
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
Column<PgDateTime> get deletedAt => customType(PgTypes.timestampWithTimezone)
|
||||||
.nullable()();
|
.nullable()();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue