umami: Migration fails from 1.36.1 to 1.37.0

Just updated my postgres flavored umami instance from 1.33.1 to 1.37.0 with all the versions in between intermediate steps.

The update to 1.37.0 did not work out however:

yarn run v1.22.19
$ npm-run-all check-db update-tracker start-server
$ node scripts/check-db.js
✓ DATABASE_URL is defined.
✓ Database connection successful.
✓ Database tables found.
Running update...
Error: P3018

A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve

Migration name: 02_add_event_data

Database error code: 42P01

Database error:
ERROR: relation "account.username_unique" does not exist

DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E42P01), message: "relation \"account.username_unique\" does not exist", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("namespace.c"), line: Some(424), routine: Some("RangeVarGetRelidExtended") }


✗ Command failed: prisma migrate deploy
Error: P3018

A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve

Migration name: 02_add_event_data

Database error code: 42P01

Database error:
ERROR: relation "account.username_unique" does not exist

DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E42P01), message: "relation \"account.username_unique\" does not exist", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("namespace.c"), line: Some(424), routine: Some("RangeVarGetRelidExtended") }



error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "check-db" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn run v1.22.19
$ npm-run-all check-db update-tracker start-server
$ node scripts/check-db.js
✓ DATABASE_URL is defined.
✓ Database connection successful.
✓ Database tables found.
✓ Database is up to date.
$ node scripts/update-tracker.js
$ node server.js
Listening on port 3000
PrismaClientKnownRequestError: The column `event.event_name` does not exist in the current database.
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28658:13)
    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:28640:12)
    at async consumer (/app/node_modules/@prisma/client/runtime/index.js:29618:18)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29639:16)
    at async Promise.all (index 2)
    at async getRealtimeData (/app/.next/server/chunks/1573.js:760:43)
    at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/realtime/update.js:142:22)
    at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/app/node_modules/next/dist/server/base-server.js:491:37) {
  code: 'P2022',
  clientVersion: '4.1.1',
  meta: { column: 'event.event_name' }
}
PrismaClientKnownRequestError: The column `event.event_name` does not exist in the current database.
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28658:13)
    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:28640:12)
    at async consumer (/app/node_modules/@prisma/client/runtime/index.js:29618:18)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29639:16)
    at async Promise.all (index 2)
    at async getRealtimeData (/app/.next/server/chunks/1573.js:760:43)
    at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/realtime/update.js:142:22)
    at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/app/node_modules/next/dist/server/base-server.js:491:37) {
  code: 'P2022',
  clientVersion: '4.1.1',
  meta: { column: 'event.event_name' }
}
PrismaClientKnownRequestError: The column `event.event_name` does not exist in the current database.
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28658:13)
    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:28640:12)
    at async consumer (/app/node_modules/@prisma/client/runtime/index.js:29618:18)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29639:16)
    at async Promise.all (index 2)
    at async getRealtimeData (/app/.next/server/chunks/1573.js:760:43)
    at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/realtime/update.js:142:22)
    at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/app/node_modules/next/dist/server/base-server.js:491:37) {
  code: 'P2022',
  clientVersion: '4.1.1',
  meta: { column: 'event.event_name' }
}
PrismaClientKnownRequestError: The column `event.event_name` does not exist in the current database.
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28658:13)
    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:28640:12)
    at async consumer (/app/node_modules/@prisma/client/runtime/index.js:29618:18)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29639:16)
    at async Promise.all (index 2)
    at async getRealtimeData (/app/.next/server/chunks/1573.js:760:43)
    at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/realtime/update.js:142:22)
    at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/app/node_modules/next/dist/server/base-server.js:491:37) {
  code: 'P2022',
  clientVersion: '4.1.1',
  meta: { column: 'event.event_name' }
}
PrismaClientKnownRequestError: The column `event.event_name` does not exist in the current database.
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28658:13)
    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:28640:12)
    at async consumer (/app/node_modules/@prisma/client/runtime/index.js:29618:18)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29639:16)
    at async Promise.all (index 2)
    at async getRealtimeData (/app/.next/server/chunks/1573.js:760:43)
    at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/realtime/update.js:142:22)
    at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/app/node_modules/next/dist/server/base-server.js:491:37) {
  code: 'P2022',
  clientVersion: '4.1.1',
  meta: { column: 'event.event_name' }
}
PrismaClientKnownRequestError: The column `event.event_name` does not exist in the current database.
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28658:13)
    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:28640:12)
    at async consumer (/app/node_modules/@prisma/client/runtime/index.js:29618:18)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29639:16)
    at async Promise.all (index 2)
    at async getRealtimeData (/app/.next/server/chunks/1573.js:760:43)
    at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/realtime/update.js:142:22)
    at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/app/node_modules/next/dist/server/base-server.js:491:37) {
  code: 'P2022',
  clientVersion: '4.1.1',
  meta: { column: 'event.event_name' }
}
PrismaClientKnownRequestError: The column `event.event_name` does not exist in the current database.
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28658:13)
    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:28640:12)
    at async consumer (/app/node_modules/@prisma/client/runtime/index.js:29618:18)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29639:16)
    at async Promise.all (index 2)
    at async getRealtimeData (/app/.next/server/chunks/1573.js:760:43)
    at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/realtime/update.js:142:22)
    at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/app/node_modules/next/dist/server/base-server.js:491:37) {
  code: 'P2022',
  clientVersion: '4.1.1',
  meta: { column: 'event.event_name' }
}
PrismaClientKnownRequestError: The column `event.event_name` does not exist in the current database.
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28658:13)
    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:28640:12)
    at async consumer (/app/node_modules/@prisma/client/runtime/index.js:29618:18)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29639:16)
    at async Promise.all (index 2)
    at async getRealtimeData (/app/.next/server/chunks/1573.js:760:43)
    at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/realtime/init.js:143:22)
    at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/app/node_modules/next/dist/server/base-server.js:491:37) {
  code: 'P2022',
  clientVersion: '4.1.1',
  meta: { column: 'event.event_name' }
}
PrismaClientKnownRequestError: The column `event.event_name` does not exist in the current database.
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28658:13)
    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:28640:12)
    at async consumer (/app/node_modules/@prisma/client/runtime/index.js:29618:18)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29639:16)
    at async Promise.all (index 2)
    at async getRealtimeData (/app/.next/server/chunks/1573.js:760:43)
    at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/realtime/init.js:143:22)
    at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/app/node_modules/next/dist/server/base-server.js:491:37) {
  code: 'P2022',
  clientVersion: '4.1.1',
  meta: { column: 'event.event_name' }
}
PrismaClientKnownRequestError: The column `event.event_name` does not exist in the current database.
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28658:13)
    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:28640:12)
    at async consumer (/app/node_modules/@prisma/client/runtime/index.js:29618:18)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29639:16)
    at async Promise.all (index 2)
    at async getRealtimeData (/app/.next/server/chunks/1573.js:760:43)
    at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/realtime/init.js:143:22)
    at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/app/node_modules/next/dist/server/base-server.js:491:37) {
  code: 'P2022',
  clientVersion: '4.1.1',
  meta: { column: 'event.event_name' }
}
PrismaClientKnownRequestError: The column `event.event_name` does not exist in the current database.
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28658:13)
    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:28640:12)
    at async consumer (/app/node_modules/@prisma/client/runtime/index.js:29618:18)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29639:16)
    at async Promise.all (index 2)
    at async getRealtimeData (/app/.next/server/chunks/1573.js:760:43)
    at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/realtime/init.js:143:22)
    at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/app/node_modules/next/dist/server/base-server.js:491:37) {
  code: 'P2022',
  clientVersion: '4.1.1',
  meta: { column: 'event.event_name' }
}
PrismaClientKnownRequestError: The column `event.event_name` does not exist in the current database.
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28658:13)
    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:28640:12)
    at async consumer (/app/node_modules/@prisma/client/runtime/index.js:29618:18)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29639:16)
    at async Promise.all (index 2)
    at async getRealtimeData (/app/.next/server/chunks/1573.js:760:43)
    at async __WEBPACK_DEFAULT_EXPORT__ (/app/.next/server/pages/api/realtime/init.js:143:22)
    at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/app/node_modules/next/dist/server/base-server.js:491:37) {
  code: 'P2022',
  clientVersion: '4.1.1',
  meta: { column: 'event.event_name' }
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 4, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 4, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 4, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 4, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 1, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 1, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 1, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 6, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 6, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 6, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 2, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 2, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 2, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 3, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 3, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 3, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 1, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 6, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 2, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 3, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 4, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 1, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 4, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 1, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 4, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 4, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 6, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 1, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 1, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 6, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 6, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 2, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 3, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 2, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 2, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 3, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 3, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 6, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 2, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 3, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 1, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 1, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 6, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 1, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 1, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 6, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 6, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 2, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 2, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 2, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 4, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 4, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 4, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 3, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 3, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 3, 2022-08-09T17:00:00.000Z, 2022-08-10T16:59:59.999Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 6, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 2, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 4, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}
{
  table: 'pageview',
  column: null,
  filters: {
    url: undefined,
    referrer: undefined,
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined
  },
  params: [ 3, 2022-08-08T17:00:00.001Z, 2022-08-09T17:00:00.000Z ]
}


Can you help me to resolve this?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 38

Most upvoted comments

Assuming you stored only string values in your event_value table, you can run the following script to run migrations of your _event_old data into your new event table. The most important thing is for your time-series data to stay intact (created_at). This is slightly different from @brycied00d because if you’re server has been running for a bit, it has already collected new event data, and you’ll run into primary key errors on data migration.

INSERT INTO event (website_id, session_id, created_at, url, event_name)
SELECT website_id, session_id, created_at, url, event_value
FROM _event_old

We didn’t include this in the migration because some users were not using the former type/value structure as intended (ex: storing json in event_value, etc).

1.37.0 has had it’s migration script updated. Please pull the latest version, then run the following commands to resolve the 02_migration failure.

yarn prisma migrate resolve --rolled-back "02_add_event_data"
yarn prisma migrate deploy
yarn check-db

Also, the events are missing from my dashboard.

@ajfriesen There wasn’t any data migration in the 02 migration, only table schema. I’m not really sure why (I’m just a user) they didn’t move the data… But I was able to migrate my existing event data to the new table without any apparent issue. (Disclaimer: Do this at your own peril, I’m just a rando on the Internet and no affiliated with the project, and this could cause things to break in the future.)

INSERT INTO event SELECT event_id, website_id, session_id, created_at, url, event_value AS event_name FROM _event_old;

when checking the logs I get on every request…

Yeah, in 89781d48 or 6ea2282f they added a console.log to lib/db.js for, I assume, debugging purposes. I’m guessing it got comitted by accident. Creates quite a bit of log spam unfortunately, but doesn’t seem to be indicative of an error.

Edit, PS: “My system automatically pulled the new 1.37.0 container image this morning. Forgot to turn off the automation.” Yeah me too… Threw me into this whole mess when I was already busy with other projects at work. I’ve learned my lesson and turned it off for now.

Okay, My system automatically pulled the new 1.37.0 container image this morning. Forgot to turn off the automation.

Anyway. I renamed my indexes as you stated:

docker exec -it blog_umami-db_1 bash
bash-5.1# psql -U umami
psql (12.12)
Type "help" for help.
umami=# ALTER INDEX "account.username_unique" RENAME TO "account_username_key";
ALTER INDEX
umami=# ALTER INDEX "session.session_uuid_unique" RENAME TO "session_session_uuid_key";
ALTER INDEX
umami=# ALTER INDEX "website.share_id_unique" RENAME TO "website_share_id_key";
ALTER INDEX
umami=# ALTER INDEX "website.website_uuid_unique" RENAME TO "website_website_uuid_key";
ALTER INDEX
umami=# ^D\q
bash-5.1# 
exit

Then I started all the migrations commands:

docker  exec -it blog_umami_1 yarn prisma migrate resolve --rolled-back "02_add_event_data"
yarn run v1.22.19
$ /app/node_modules/.bin/prisma migrate resolve --rolled-back 02_add_event_data
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "umami", schema "public" at "umami-db:5432"
Migration 02_add_event_data marked as rolled back.
Done in 1.46s.
docker  exec -it blog_umami_1 yarn prisma migrate deploy
yarn run v1.22.19
$ /app/node_modules/.bin/prisma migrate deploy
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "umami", schema "public" at "umami-db:5432"

2 migrations found in prisma/migrations

Applying migration `02_add_event_data`

The following migration have been applied:

migrations/
  └─ 02_add_event_data/
    └─ migration.sql
      
All migrations have been successfully applied.
Done in 1.32s.
docker  exec -it blog_umami_1 npm run check-db

> umami@1.37.0 check-db
> node scripts/check-db.js

✓ DATABASE_URL is defined.
✓ Database connection successful.
✓ Database tables found.
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "umami", schema "public" at "umami-db:5432"

2 migrations found in prisma/migrations


Database schema is up to date!

✓ Database is up to date.
npm notice 
npm notice New minor version of npm available! 8.11.0 -> 8.17.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.17.0
npm notice Run npm install -g npm@8.17.0 to update!
npm notice 

That looked promising to me.

But I have the same problem when checking the logs I get on every request:

{
  table: 'event',
  column: 'event_name',
  filters: {
    domain: undefined,
    url: undefined,
    referrer: Symbol(filter-ignored),
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined,
    event_url: undefined,
    query: undefined
  },
  params: [ 1, 2022-08-11T14:00:00.000Z, 2022-08-12T13:59:59.999Z ]
}
{
  table: 'pageview',
  column: 'referrer',
  filters: {
    domain: 'www.ajfriesen.com',
    url: undefined,
    referrer: Symbol(filter-ignored),
    os: undefined,
    browser: undefined,
    device: undefined,
    country: undefined,
    event_url: undefined,
    query: undefined
  },
  params: [ 1, 2022-08-11T14:00:00.000Z, 2022-08-12T13:59:59.999Z ]
}


Also, the events are missing from my dashboard. Did I do something wrong here?