-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Janderson Souza Matias
authored and
Janderson Souza Matias
committed
Sep 29, 2023
1 parent
6fbb95c
commit 30b2d74
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import {SQLiteDatabase} from 'react-native-sqlite-storage'; | ||
import {getDBConnection} from '../../services/database.service'; | ||
|
||
export const runMigrationV7 = async () => { | ||
const db = await getDBConnection(); | ||
await updateQuestions(db); | ||
}; | ||
|
||
const updateQuestions = async (db: SQLiteDatabase) => { | ||
await db.executeSql(` | ||
UPDATE question | ||
SET title = 'The teacher does not treat any gender group unfairly in the classroom' | ||
WHERE id = '6779b8e9-da1d-4c3a-8691-53c6233a914d' | ||
`); | ||
|
||
await db.executeSql(` | ||
UPDATE question | ||
SET title = ' The teacher monitors most students during independent/group work' | ||
WHERE id = '21ab1281-4d6a-4d9c-850b-5b852fff7c01' | ||
`); | ||
}; |