You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Change the ownership of the files to `mysql` instead of `root`: `podman exec -it mysql-server-db /bin/bash`and `chown mysql /var/lib/mysql/openbiblio/*`
116
116
117
-
- Export the following tables as json, sort them by date `create_dt`: `member`, `biblio_status_hist`, `biblio`, `biblio_field`, `biblio_copy`. Copy them together in `book_all.json` (this is a bit tedious). It is important to sort by date (oldest first), because the history of rentals needs to be in the correct order.
117
+
- Export the following tables as json, sort them by date `create_dt`: `member`, `biblio_status_hist`, `biblio`, `biblio_field`, `biblio_copy` into the respective file names e.g. `member.json` etc. It is important to sort by date (oldest first), because the history of rentals needs to be in the correct order.
118
118
119
-
- Export the `member` table into `member.json`
119
+
*IMPORTANT* don't click on export, first do the sorted SQL query and then export the query result as json. For example, the member export has the query `SELECT * FROM member ORDER BY member.create_dt ASC`
- All files start with a json array with brackets, e.g. like this
125
+
```
126
+
[
127
+
{
128
+
"type": "header",
129
+
"version": "5.2.1",
130
+
"comment": "Export to JSON plugin for PHPMyAdmin"
131
+
},
132
+
{ "type": "database", "name": "openbiblio" },
133
+
...
134
+
```
135
+
136
+
- Copy them together in `book_all.json`. this is a bit tedious and best done in vscode or alike. So each key contains the content for each file, here is an example:
*IMPORTANT* don't click on export, first do the sorted SQL query and then export the query result as json. For example, the member export has the query `SELECT * FROM member ORDER BY member.create_dt ASC`
140
+
- You can validate the json as valid e.g. using a [validator](https://jsonformatter.curiousconcept.com/)
- In openlibry delete the database file `dev.db` and the `migrations` folder if it exists. Then recreate them with `npx prisma migrate dev --name init`
0 commit comments