CaramelFur / Picsur

An easy to use, selfhostable image sharing service like Imgur with built in converting
https://picsur.org/
GNU Affero General Public License v3.0
841 stars 41 forks source link

Migration "V030A1661692206479" failed, error: relation "e_image_backend" already exists #10

Closed MyWay closed 2 years ago

MyWay commented 2 years ago

Hi, I'm trying to upgrade to latest version, but I keep getting:

ERROR [ExceptionHandler] relation "e_image_backend" already exists
QueryFailedError: relation "e_image_backend" already exists
    at PostgresQueryRunner.query (/picsur/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async V030A1661692206479.up (file:///picsur/backend/dist/database/migrations/1661692206479-V_0_3_0_a.js:12:9)
    at async MigrationExecutor.executePendingMigrations (/picsur/node_modules/typeorm/migration/MigrationExecutor.js:178:17)
    at async DataSource.runMigrations (/picsur/node_modules/typeorm/data-source/DataSource.js:248:35)
    at async DataSource.initialize (/picsur/node_modules/typeorm/data-source/DataSource.js:137:17)
CaramelFur commented 2 years ago

Hi, v0.3.0 is sadly not compatible with the database of v0.2.0. So you'll have to either clear the database or move to a new one. But from this version on it will be compatible with later versions, as migrations have been properly implemented in v0.3.0.