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 errors to 0.90.3 #1760

Closed
4 of 5 tasks
o1lab opened this issue Apr 19, 2022 · 2 comments
Closed
4 of 5 tasks

Migration errors to 0.90.3 #1760

o1lab opened this issue Apr 19, 2022 · 2 comments
Assignees
Labels
🔴 Priority : Critical Issue prevents most users from using NocoDB or the core functionality is breaking 🐛 Type: Bug Something is broken or incorrect unexpectedly.

Comments

@o1lab
Copy link
Member

o1lab commented Apr 19, 2022

  • 1. Invalid formula : need to handle exception
Unclosed ( at character 14","err":"Error: Unclosed ( at character 14\n    at throwError
  • 2. Trying to extract view id
Cannot read property 'id' of undefined","err":"TypeError: Cannot read property 'id' of undefined\n 
  • 3. nc_users_v2 doesnt exist.
insert into \"nc_users_v2\" (\"created_at\", \"email\", \"email_verification_token\", \"email_verified\", \"firstname\", \"id\", \"invite_token\", \"invite_token_expires\", \"lastname\", \"password\", \"refresh_token\", \"reset_password_expires\", \"reset_password_token\", \"roles\", \"salt\", \"updated_at\", \"username\") values (CURRENT_TIMESTAMP, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, CURRENT_TIMESTAMP, $15) - relation \"nc_users_v2\" does not exist","err":"error: insert into \"nc_users_v2\" (\"created_at\", \"email\", \"email_verification_token\", \"email_verified\", \"firstname\", \"id\", \"invite_token\", \"invite_token_expires\", \"lastname\", \"password\", \"refresh_token\", \"reset_password_expires\", \"reset_password_token\", \"roles\", \"salt\", \"updated_at\", \"username\") values (CURRENT_TIMESTAMP, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, CURRENT_TIMESTAMP, $15) - relation \"nc_users_v2\" does not exist\n    at
  • 4. Cannot add or update a child row: a foreign key constraint fails
\"insert into `nc_project_users_v2` (`created_at`, `fk_user_id`, `project_id`, `roles`, `updated_at`) values (CURRENT_TIMESTAMP, 3, \'ha_prod_docker__aved\', \'editor\', CURRENT_TIMESTAMP) - Cannot add or update a child row: a foreign key constraint fails (`root_db`.`nc_project_users_v2`, CONSTRAINT `nc_project_users_v2_fk_user_id_foreign` FOREIGN KEY (`fk_user_id`) REFERENCES `nc_users_v2` (`id`))\",\"err\":\"Error: insert into `nc_project_users_v2` (`created_at`, `fk_user_id`, `project_id`, `roles`, `updated_at`) values (CURRENT_TIMESTAMP, 3, \'ha_prod_docker__aved\', \'editor\', CURRENT_TIMESTAMP) - Cannot add or update a child row: a foreign key constraint fails (`root_db`.`nc_project_users_v2`, CONSTRAINT `nc_project_users_v2_fk_user_id_foreign` FOREIGN KEY (`fk_user_id`) REFERENCES `nc_users_v2`
  • 5. nc_shared_bases doesn't exist
"select * from \"nc_shared_bases\" - relation \"nc_shared_bases\" does not exist","err":"error: select * from \"nc_shared_bases\" - relation \"nc_shared_bases\" does not exist\n    
@o1lab o1lab changed the title Migration errors Migration errors to 0.90.3 Apr 19, 2022
@pranavxc pranavxc added the 🐛 Type: Bug Something is broken or incorrect unexpectedly. label Apr 19, 2022
@pranavxc pranavxc self-assigned this Apr 19, 2022
@o1lab
Copy link
Member Author

o1lab commented Apr 19, 2022

@dstala : can you try creating v1 docker

  • with NC_DB pointing to postgres (public schema is default). And then migrate to v2.
  • with NC_DB pointing to a non-public postgres schema . And then migrate to v2.

Issue 3 might show up with that.

pranavxc added a commit that referenced this issue Apr 19, 2022
re #1760

Signed-off-by: Pranav C <pranavxc@gmail.com>
@o1lab o1lab added the 🔴 Priority : Critical Issue prevents most users from using NocoDB or the core functionality is breaking label Apr 19, 2022
pranavxc added a commit that referenced this issue Apr 19, 2022
… missing

re #1760

Signed-off-by: Pranav C <pranavxc@gmail.com>
pranavxc added a commit that referenced this issue Apr 19, 2022
re #1760

Signed-off-by: Pranav C <pranavxc@gmail.com>
pranavxc added a commit that referenced this issue Apr 19, 2022
* fix: handle formula parse error in formula migration

re #1760

Signed-off-by: Pranav C <pranavxc@gmail.com>

* fix: avoid project user insertion if corresponding project or user is missing

re #1760

Signed-off-by: Pranav C <pranavxc@gmail.com>

* fix: skip shared views if view_name/model_name is empty or missing

re #1760

Signed-off-by: Pranav C <pranavxc@gmail.com>

* fix: migration down statement correction

Signed-off-by: Pranav C <pranavxc@gmail.com>

* fix(migration): split alter table statement into multiple statements to support MSSQL

re #1764

Signed-off-by: Pranav C <pranavxc@gmail.com>
@github-actions
Copy link
Contributor

Fixed in v0.90.4.

pranavxc added a commit that referenced this issue Apr 19, 2022
* chore(deps): bump minimist

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump async from 2.6.3 to 2.6.4 in /packages/noco-docs-prev

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump async from 2.6.3 to 2.6.4 in /packages/noco-docs

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump async from 2.6.3 to 2.6.4 in /packages/nc-plugin

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump async from 2.6.3 to 2.6.4 in /packages/nc-cli

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump async from 2.6.3 to 2.6.4 in /packages/noco-i18n

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump async from 2.6.3 to 2.6.4 in /packages/noco-blog

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump async from 2.6.3 to 2.6.4 in /packages/nocodb-sdk

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump minimist from 1.2.5 to 1.2.6 in /packages/nocodb

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* refactor: i18n zh_CN corrections

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>

* refactor: use SqlFactory from nocodb-sdk package (#1750)

Signed-off-by: Pranav C <pranavxc@gmail.com>

* fix: refer parent table referenced column in filter query(BT)

re #1756

Signed-off-by: Pranav C <pranavxc@gmail.com>

* fix: wrap nested add update query select part to avoid issue when referencing same table

Signed-off-by: Pranav C <pranavxc@gmail.com>

* chore(deps): bump async in /packages/nc-migrator-archived

Bumps [async](https://github.com/caolan/async) from 2.6.2 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.2...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* docs: add info related to {orgs} and swagger ui

Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>

* Fix - Migration bugs (#1771)

* fix: handle formula parse error in formula migration

re #1760

Signed-off-by: Pranav C <pranavxc@gmail.com>

* fix: avoid project user insertion if corresponding project or user is missing

re #1760

Signed-off-by: Pranav C <pranavxc@gmail.com>

* fix: skip shared views if view_name/model_name is empty or missing

re #1760

Signed-off-by: Pranav C <pranavxc@gmail.com>

* fix: migration down statement correction

Signed-off-by: Pranav C <pranavxc@gmail.com>

* fix(migration): split alter table statement into multiple statements to support MSSQL

re #1764

Signed-off-by: Pranav C <pranavxc@gmail.com>

* refactor: add null check in upgrader

Signed-off-by: Pranav C <pranavxc@gmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
Co-authored-by: navi <oof1lab@gmail.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔴 Priority : Critical Issue prevents most users from using NocoDB or the core functionality is breaking 🐛 Type: Bug Something is broken or incorrect unexpectedly.
Projects
None yet
Development

No branches or pull requests

2 participants