github.com/quickfeed/quickfeed@v0.0.0-20240507093252-ed8ca812a09c/doc/dev/testdb.md (about) 1 # Test Database 2 3 The `test.db` database uses the updated Quickfeed schema without any json-encoded string fields. 4 Hence, the `DisableForeignKeyConstraintWhenMigrating` (`gormdb.go:48`) should not be set to true. 5 6 - The easiest way to inspect or edit the database is to use a sqlite database browser GUI, for example the [DB Browser](https://sqlitebrowser.org/) or the `sqlite3` command-line tool. 7 8 - User with ID 1 is a super user registered as `CourseCreator` of all courses in the database. 9 The `RemoteIdentity` record for this user can be replaced with GitHub's remote ID and access token of your GitHub user to login as super user. Additionally, replace `login` field of the `User` record with your GitHub login. 10 11 To update with the command-line tool: 12 13 ```sql 14 sqlite3 test.db 15 update remote_identities 16 set remote_id = {id: int}, access_token = {token: string} 17 where id = 1; 18 19 update users 20 set login = {login: string} 21 where id = 1; 22 ``` 23 24 - Course with ID 1 is based on the [qf406](https://github.com/qf406) organization created specifically for testing purposes. 25 This organization can be used for any kind of testing: adding or removing users and groups/teams, adding assignments and tests, pushing submissions to student repos and so on. 26 Request an invite to the repository if you want to use it for testing.