cachethq / Docker

A Dockerized version of Cachet.
https://cachethq.io
BSD 3-Clause "New" or "Revised" License
411 stars 285 forks source link

Duplicate key error when running migrations #412

Closed antarr closed 3 years ago

antarr commented 3 years ago

I'm trying to run Ratchet on render.com using docker. I've gotten it configured with the environment variables but I'm getting an error when the container starts saying Unique violation: 7 ERROR: duplicate key value violates u. This is with a new database that has never been used.

logs

Jun 27 03:07:36 PM  Copied Directory [/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views] To [/resources/views/errors]
Jun 27 03:07:36 PM  Copied Directory [/vendor/laravel/framework/src/Illuminate/Notifications/resources/views] To [/resources/views/vendor/notifications]
Jun 27 03:07:36 PM  Copied Directory [/vendor/laravel/framework/src/Illuminate/Pagination/resources/views] To [/resources/views/vendor/pagination]
Jun 27 03:07:36 PM  Copied File [/vendor/bugsnag/bugsnag-laravel/config/bugsnag.php] To [/config/bugsnag.php]
Jun 27 03:07:36 PM  Copied Directory [/vendor/laravel/framework/src/Illuminate/Mail/resources/views] To [/resources/views/vendor/mail]
Jun 27 03:07:36 PM  Publishing complete.
Jun 27 03:07:37 PM  
Jun 27 03:07:37 PM  In Connection.php line 664:
Jun 27 03:07:37 PM  
Jun 27 03:07:37 PM    SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates u
Jun 27 03:07:37 PM    nique constraint "pg_type_typname_nsp_index"
Jun 27 03:07:37 PM    DETAIL:  Key (typname, typnamespace)=(migrations_id_seq, 2200) already exis
Jun 27 03:07:37 PM    ts. (SQL: create table "migrations" ("id" serial primary key not null, "mig
Jun 27 03:07:37 PM    ration" varchar(191) not null, "batch" integer not null))
Jun 27 03:07:37 PM  
Jun 27 03:07:37 PM  
Jun 27 03:07:37 PM  In PDOStatement.php line 119:
Jun 27 03:07:37 PM  
Jun 27 03:07:37 PM    SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates u
Jun 27 03:07:37 PM    nique constraint "pg_type_typname_nsp_index"
Jun 27 03:07:37 PM    DETAIL:  Key (typname, typnamespace)=(migrations_id_seq, 2200) already exis
Jun 27 03:07:37 PM    ts.
Jun 27 03:07:37 PM  
Jun 27 03:07:37 PM  
Jun 27 03:07:37 PM  In PDOStatement.php line 117:
Jun 27 03:07:37 PM  
Jun 27 03:07:37 PM    SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates u
Jun 27 03:07:37 PM    nique constraint "pg_type_typname_nsp_index"
Jun 27 03:07:37 PM    DETAIL:  Key (typname, typnamespace)=(migrations_id_seq, 2200) already exis
Jun 27 03:07:37 PM    ts.
Jun 27 03:07:37 PM  
Jun 27 03:07:37 PM  

environment variables

APP_ENV=production
APP_DEBUG=false
APP_URL=myappurl
APP_KEY=base64:+mykey
DB_DRIVER=pgsql
DB_HOST=mydbhost
DB_DATABASE=cachetdb
DB_USERNAME=myusername
DB_PASSWORD=mypassword
DB_PORT=5432
CACHE_DRIVER=redis
SESSION_DRIVER=redis
QUEUE_DRIVER=sync
CACHET_EMOJI=true
REDIS_HOST=redis-xxx
REDIS_PORT=10000
GITHUB_TOKEN=xxx