email
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (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:
Dmitry 2025-12-14 03:00:38 +03:00
parent 3f3cf251da
commit f66d66ae5c
2 changed files with 8 additions and 5 deletions

View file

@ -179,6 +179,14 @@ class AppDatabase extends _$AppDatabase {
final result = await customSelect('SELECT 1 as test').getSingle(); final result = await customSelect('SELECT 1 as test').getSingle();
print('Database connection successful: ${result.data}'); print('Database connection successful: ${result.data}');
// Удалить constraint valid_email если он существует
try {
await customStatement('ALTER TABLE users DROP CONSTRAINT IF EXISTS valid_email');
print('Removed valid_email constraint if it existed');
} catch (e) {
print('Warning: Could not remove valid_email constraint: $e');
}
// Включить foreign key constraints // Включить foreign key constraints
await customStatement('SET CONSTRAINTS ALL IMMEDIATE'); await customStatement('SET CONSTRAINTS ALL IMMEDIATE');
}, },

View file

@ -33,11 +33,6 @@ class Users extends Table {
@override @override
Set<Column> get primaryKey => {id}; Set<Column> get primaryKey => {id};
@override
List<String> get customConstraints => [
'CONSTRAINT valid_email CHECK (email IS NULL OR TRUE)',
];
} }
/// Таблица UserDatas - расширенная информация о пользователе /// Таблица UserDatas - расширенная информация о пользователе