Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migration script 6.3.0 error #6602

Open
ROBERT-MCDOWELL opened this issue Sep 21, 2024 · 0 comments
Open

migration script 6.3.0 error #6602

ROBERT-MCDOWELL opened this issue Sep 21, 2024 · 0 comments

Comments

@ROBERT-MCDOWELL
Copy link
Contributor

ROBERT-MCDOWELL commented Sep 21, 2024

Describe the current behavior

migration update script error, missing columns...

Updating "formatFlags" column for web videos in "videoFile" table in database

Error
at Query.run (/home/PEERTUBE/mypt/versions/peertube-v6.3.0/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)
at /home/PEERTUBE/mypt/versions/peertube-v6.3.0/node_modules/sequelize/lib/sequelize.js:315:28
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async run (file:///home/PEERTUBE/mypt/versions/peertube-v6.3.0/dist/scripts/migrations/peertube-6.3.js:22:21) {
name: 'SequelizeDatabaseError',
parent: error: column "formatFlags" does not exist
at Parser.parseErrorMessage (/home/PEERTUBE/mypt/versions/peertube-v6.3.0/node_modules/pg-protocol/dist/parser.js:283:98)
at Parser.handlePacket (/home/PEERTUBE/mypt/versions/peertube-v6.3.0/node_modules/pg-protocol/dist/parser.js:122:29)
at Parser.parse (/home/PEERTUBE/mypt/versions/peertube-v6.3.0/node_modules/pg-protocol/dist/parser.js:35:38)
at Socket. (/home/PEERTUBE/mypt/versions/peertube-v6.3.0/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
length: 111,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: undefined,
position: '77',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '3722',
routine: 'errorMissingColumn',
sql: 'SELECT COUNT() AS "total" FROM "videoFile" WHERE "videoId" IS NOT NULL AND "formatFlags" != 1',
parameters: undefined
},
original: error: column "formatFlags" does not exist
at Parser.parseErrorMessage (/home/PEERTUBE/mypt/versions/peertube-v6.3.0/node_modules/pg-protocol/dist/parser.js:283:98)
at Parser.handlePacket (/home/PEERTUBE/mypt/versions/peertube-v6.3.0/node_modules/pg-protocol/dist/parser.js:122:29)
at Parser.parse (/home/PEERTUBE/mypt/versions/peertube-v6.3.0/node_modules/pg-protocol/dist/parser.js:35:38)
at Socket. (/home/PEERTUBE/mypt/versions/peertube-v6.3.0/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
length: 111,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: undefined,
position: '77',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '3722',
routine: 'errorMissingColumn',
sql: 'SELECT COUNT(
) AS "total" FROM "videoFile" WHERE "videoId" IS NOT NULL AND "formatFlags" != 1',
parameters: undefined
},
sql: 'SELECT COUNT(*) AS "total" FROM "videoFile" WHERE "videoId" IS NOT NULL AND "formatFlags" != 1',
parameters: {}
}

Steps to reproduce

run the the update
cd /home/PEERTUBE/mypt/peertube-latest/dist/scripts && sudo -H -u peertube ./upgrade.sh /home/PEERTUBE/mypt

the run the migration script
cd /home/PEERTUBE/mypt/peertube-latest && sudo -u peertube NODE_CONFIG_DIR=/home/PEERTUBE/mypt/config NODE_ENV=production node dist/scripts/migrations/peertube-6.3.js

Additional information

  • PeerTube instance: 6.3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant