1.2 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			1.2 KiB
		
	
	
	
	
	
	
	
Troubleshooting Migrations
In some cases, HedgeDoc might apply migrations without correctly saving the progress.
In these cases, HedgeDoc will refuse to start with “already exists”-errors like
ERROR: type "enum_Notes_permission" already exists.
To fix these issues, manual intervention in the database is required:
- Make sure you have a way to edit the database directly. For SQLite, PostgreSQL and MariaDB/MySQL, you can use the
respective command-line tools sqlite3,psqlandmysql.
- Get the name of the failing migration and append .jsto it. For example, if you encounter this error
 the name of the failed migration would be== 20180306150303-fix-enum: migrating ======= ERROR: type "enum_Notes_permission" already exists20180306150303-fix-enum.js.
- Make sure HedgeDoc does not run and insert the name into the SequelizeMetatable.
 Ensure your database shell is connected to the HedgeDoc database. The SQL-statement may look like this:INSERT INTO "SequelizeMeta" (name) VALUES ('20180306150303-fix-enum.js');
- Start HedgeDoc again and observe if it starts correctly. It may be necessary to repeat this process
and insert multiple migrations into the SequelizeMetatable.