here's an update.

the issue was the conversion between sqlite and mysql.
dajango has issue converting it.

so here's what i did to resolve it.

1. cleared off any old containers and volume in docker.

2. we need to create an account first, so i ran this.
docker run -d --name mayan-edms --restart=always -p 8000:80 -v 
mayan_data:/var/lib/mayan mayanedms/mayanedms:2.7.3

3. used the web browser login and reset the admin password.

4. stop the container
docker stop mayan-edms

5. i'll need to copy out the sqlite database. you path may be different
sudo cp /var/lib/docker/volume/mayan_data/_data/db.sqlite3 .

6. get the sql queries .
sqlite3 db.sqlite3 .dump > db.sql

7. this will create a text file with the sql queries.

8. i used a text parser to fix some of the differences between sqlite and 
mysql. i've attached it so if you want to use it you can.
sqlitetomysql db.sql > stillneedtofix.sql

9. this creates another file, which has be some what fixed.

10. choose your fav text editor and do find and replace of " to `

11. this is the tedious part, i used phpmyadmin to import the sql into the 
db,
so at each error search for the table name in the example below is 
metadata_metadatatype
and add the ` for each of the column names.  so it'll look something like 
this.

CREATE TABLE IF NOT EXISTS metadata_metadatatype (`id` integer NOT NULL 
PRIMARY KEY AUTO_INCREMENT, `name` varchar(48) NOT NULL UNIQUE, `label` 
varchar(48) NOT NULL, `default` varchar(128) NULL, `lookup` text NULL, 
`validation` varchar(64) NOT NULL, `parser` varchar(64) NOT NULL);

there are quite a few of these, so just go down the line.

12. once you've gone through the queries, drop and create the database and 
import it in again. you may have missed something or something did not get 
imported. 

13, now you'll need to clear off the container and volume
docker rm -v mayan-edms

14. 
docker run -d --name mayan-edms --env-file=mayan_edms_env --restart=always 
-p 8000:80 -v mayan_media:/var/lib/mayan -v 
/var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock 
mayanedms/mayanedms:2.7.3

--name mayan-edms : container name
--env-file=mayan_edms_env : the enviroment file
-v /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock : map the mysql 
socket to the container

15. go to the web browser, remember at the start why i said to reset the 
password, the onetime login doesn't run. 
insert in a document and ocr it, the contents will now appear in the mysql 
server instead of the sqlite.

well i hope this helps someone.


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: sqliteTomysql
Description: Binary data

Reply via email to