[GH-ISSUE #3197] Management fail to upgrade database from v0.35.2 to v0.36.1 with postgresql #6554

Open
opened 2026-08-05 01:08:55 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @MrBE4R on GitHub (Jan 16, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/3197

Describe the problem

Upgrading from v0.35.2 to v0.36.1 fail to upgrade schema with postgresql database.

management-1  | 2025-01-16T22:02:08Z INFO [context: SYSTEM] management/server/migration/migration.go:326: Column enabled does not exist in table network_resources, adding it
management-1  | Error: failed creating Store: /var/lib/netbird/: migrate: failed to find rows with empty enabled: ERROR: invalid input syntax for type boolean: "" (SQLSTATE 22P02)
management-1  | 2025-01-16T22:18:41Z INFO [context: SYSTEM] management/server/migration/migration.go:326: Column enabled does not exist in table network_routers, adding it
management-1  | Error: failed creating Store: /var/lib/netbird/: migrate: failed to find rows with empty enabled: ERROR: invalid input syntax for type boolean: "" (SQLSTATE 22P02)

To Reproduce

  • Deploy netbird v0.35.2 with postgresql
  • Upgrade to v0.36.1

Expected behavior

A clear and concise description of what you expected to happen.

Additional context

Manually adding the missing column allow the management to start.

alter table network_routers add column "enabled" text ;
alter table network_resources add column "enabled" text ;
Originally created by @MrBE4R on GitHub (Jan 16, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/3197 **Describe the problem** Upgrading from v0.35.2 to v0.36.1 fail to upgrade schema with postgresql database. ``` management-1 | 2025-01-16T22:02:08Z INFO [context: SYSTEM] management/server/migration/migration.go:326: Column enabled does not exist in table network_resources, adding it management-1 | Error: failed creating Store: /var/lib/netbird/: migrate: failed to find rows with empty enabled: ERROR: invalid input syntax for type boolean: "" (SQLSTATE 22P02) management-1 | 2025-01-16T22:18:41Z INFO [context: SYSTEM] management/server/migration/migration.go:326: Column enabled does not exist in table network_routers, adding it management-1 | Error: failed creating Store: /var/lib/netbird/: migrate: failed to find rows with empty enabled: ERROR: invalid input syntax for type boolean: "" (SQLSTATE 22P02) ``` **To Reproduce** - Deploy netbird v0.35.2 with postgresql - Upgrade to v0.36.1 **Expected behavior** A clear and concise description of what you expected to happen. **Additional context** Manually adding the missing column allow the management to start. ``` alter table network_routers add column "enabled" text ; alter table network_resources add column "enabled" text ; ```
saavagebueno added the bugmanagement-serviceself-hostingstore labels 2026-08-05 01:08:55 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#6554