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
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:
parent
3f3cf251da
commit
f66d66ae5c
2 changed files with 8 additions and 5 deletions
|
|
@ -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');
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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 - расширенная информация о пользователе
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue