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

Validation error on upgrade #3992

Open
vibl opened this issue Apr 9, 2024 · 2 comments
Open

Validation error on upgrade #3992

vibl opened this issue Apr 9, 2024 · 2 comments

Comments

@vibl
Copy link

vibl commented Apr 9, 2024

Describe the bug

The yarn nocobase upgrade command fails with a Validation error (see logs below). (And then yarn dev also fails obviously, because the upgrade has not completed.)

I upgraded from a SQLite database which I had installed in last mid-october (with the last Nocobase version at the time) following https://docs.nocobase.com/welcome/getting-started/installation/git-clone

Version

The current one (git pull).

How To Reproduce

https://docs.nocobase.com/welcome/getting-started/upgrading/git-clone

Desktop (please complete the following information)

Kubuntu 23.10

Additional context

End of the log of the yarn nocobase upgrade error.

{
  event: 'migrated',
  name: '20240307215012-change-name/@nocobase/plugin-workflow-action-trigger',
  durationSeconds: 0.04
}
2024-04-09 11:19:03 [info ] run upgrade                                  module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [debug] upgrade plugin [error-handler]               module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [debug] upgrade plugin [collection-manager]          module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [debug] upgrade plugin [ui-schema-storage]           module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [info ] install built-in plugin [file-manager]       module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [debug] Executing (default): SELECT `id`, `createdAt`, `updatedAt`, `title`, `name`, `type`, `options`, `rules`, `path`, `baseUrl`, `default`, `paranoid` FROM `storages` AS `storages` WHERE `storages`.`name` = 'local' LIMIT 1; app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [debug] upgrade plugin [file-manager]                module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [debug] upgrade plugin [system-settings]             module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [info ] install built-in plugin [sequence-field]     module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [debug] upgrade plugin [sequence-field]              module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [info ] install built-in plugin [verification]       module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [debug] upgrade plugin [verification]                module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [debug] upgrade plugin [users]                       module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [debug] upgrade plugin [acl]                         module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [info ] install built-in plugin [china-region]       module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [debug] Executing (default): INSERT INTO `chinaRegions` (`createdAt`,`updatedAt`,`code`,`name`,`level`) VALUES ('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','11','北京市',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','12','天津市',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','13','河北省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','14','山西省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','15','内蒙古自治区',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','21','辽宁省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','22','吉林省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','23','黑龙江省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','31','上海市',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','32','江苏省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','33','浙江省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','34','安徽省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','35','福建省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','36','江西省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','37','山东省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','41','河南省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','42','湖北省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','43','湖南省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','44','广东省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','45','广西壮族自治区',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','46','海南省',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','50','重庆市',1),('2024-04-09 09:19:03.716 +00:00','2024-04-09 09:19:03.716 +00:00','51','四川省',1),('2024-04-09 09:19:03.716 ... app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [error] Validation error                             stack=Error
    at Database.<anonymous> (/home/vianney/dev/js/forks/nocobase/node_modules/sequelize/src/dialects/sqlite/query.js:236:27)
    at <anonymous> (/home/vianney/dev/js/forks/nocobase/node_modules/sequelize/src/dialects/sqlite/query.js:234:50)
    at new Promise (<anonymous>)
    at Query.run (/home/vianney/dev/js/forks/nocobase/node_modules/sequelize/src/dialects/sqlite/query.js:234:12)
    at <anonymous> (/home/vianney/dev/js/forks/nocobase/node_modules/sequelize/src/sequelize.js:650:28)
    at SQLiteQueryInterface.bulkInsert (/home/vianney/dev/js/forks/nocobase/node_modules/sequelize/src/dialects/abstract/query-interface.js:881:21)
    at recursiveBulkCreate (/home/vianney/dev/js/forks/nocobase/node_modules/sequelize/src/model.js:2851:25)
    at Function.bulkCreate (/home/vianney/dev/js/forks/nocobase/node_modules/sequelize/src/model.js:2977:12)
    at PluginChinaRegion.importData (/home/vianney/dev/js/forks/nocobase/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts:42:5)
    at PluginChinaRegion.install (/home/vianney/dev/js/forks/nocobase/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts:15:5) module=application app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
2024-04-09 11:19:03 [debug] Executing (default): SELECT `id`, `createdAt`, `updatedAt`, `key`, `title`, `enabled`, `description`, `type`, `triggerTitle`, `config`, `executed`, `allExecuted`, `current`, `sync`, `options` FROM `workflows` AS `workflows` WHERE `workflows`.`enabled` = 1; app=main reqId=ee3d088e-ae14-4979-94ef-5ce51454181b
Done in 7.00s.

@chenos
Copy link
Contributor

chenos commented Apr 11, 2024

@vibl Upgraded from which version?

@Indrajeet911
Copy link

Latest version

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

3 participants