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

Merge error "Unknown column 'spdataset.data' in 'field list'" #3874

Closed
bronwyncombs opened this issue Jul 31, 2023 · 2 comments
Closed

Merge error "Unknown column 'spdataset.data' in 'field list'" #3874

bronwyncombs opened this issue Jul 31, 2023 · 2 comments
Labels
1 - Bug Incorrect behavior of the product 2 - Merging res:wontfix Design decision or behaviour that won't be changed. Use this alongside "Close as not planned"
Milestone

Comments

@bronwyncombs
Copy link

Describe the bug
OperationalError on merge

To Reproduce
Steps to reproduce the behavior:

  1. Merge accession agents using instructions from this comment
  2. Click Merge
  3. See error

Screenshots
Screenshot 2023-07-31 at 1 31 35 PM

Desktop:

  • macOS, Chrome, v7.9-dev
    Database Name: archireef

Additional context
Specify 7 Crash Report - 2023-07-31T18_31_53.402Z.txt

@bronwyncombs bronwyncombs added 1 - Bug Incorrect behavior of the product 2 - Merging labels Jul 31, 2023
@bronwyncombs bronwyncombs added this to the 7.9 milestone Jul 31, 2023
@melton-jason melton-jason added the res:wontfix Design decision or behaviour that won't be changed. Use this alongside "Close as not planned" label Jul 31, 2023
@melton-jason
Copy link
Contributor

This issue should only be specific to the archireef database.

Looking at the server, their database has a malformed spdataset table:

MariaDB [archireef]> desc spdataset;
+--------------------+--------------+------+-----+---------+----------------+
| Field              | Type         | Null | Key | Default | Extra          |
+--------------------+--------------+------+-----+---------+----------------+
| id                 | int(11)      | NO   | PRI | NULL    | auto_increment |
| name               | varchar(256) | NO   |     | NULL    |                |
| columns            | longtext     | NO   |     | NULL    |                |
| uploadplan         | longtext     | YES  |     | NULL    |                |
| uploadresult       | longtext     | YES  |     | NULL    |                |
| collection_id      | int(11)      | NO   | MUL | NULL    |                |
| specifyuser_id     | int(11)      | NO   | MUL | NULL    |                |
| visualorder        | longtext     | YES  |     | NULL    |                |
| importedfilename   | longtext     | YES  |     | NULL    |                |
| remarks            | longtext     | YES  |     | NULL    |                |
| timestampcreated   | datetime(6)  | NO   |     | NULL    |                |
| timestampmodified  | datetime(6)  | NO   |     | NULL    |                |
| createdbyagent_id  | int(11)      | YES  | MUL | NULL    |                |
| modifiedbyagent_id | int(11)      | YES  | MUL | NULL    |                |
+--------------------+--------------+------+-----+---------+----------------+
14 rows in set (0.002 sec)

Compare this to the spdataset table on the fwri database:

MariaDB [fwri]> desc spdataset;
+--------------------+--------------+------+-----+---------+----------------+
| Field              | Type         | Null | Key | Default | Extra          |
+--------------------+--------------+------+-----+---------+----------------+
| id                 | int(11)      | NO   | PRI | NULL    | auto_increment |
| name               | varchar(256) | NO   |     | NULL    |                |
| columns            | longtext     | NO   |     | NULL    |                |
| data               | longtext     | NO   |     | NULL    |                |
| uploadplan         | longtext     | YES  |     | NULL    |                |
| uploaderstatus     | longtext     | YES  |     | NULL    |                |
| uploadresult       | longtext     | YES  |     | NULL    |                |
| rowresults         | longtext     | YES  |     | NULL    |                |
| collection_id      | int(11)      | NO   | MUL | NULL    |                |
| specifyuser_id     | int(11)      | NO   | MUL | NULL    |                |
| visualorder        | longtext     | YES  |     | NULL    |                |
| importedfilename   | longtext     | YES  |     | NULL    |                |
| remarks            | longtext     | YES  |     | NULL    |                |
| timestampcreated   | datetime(6)  | NO   |     | NULL    |                |
| timestampmodified  | datetime(6)  | NO   |     | NULL    |                |
| createdbyagent_id  | int(11)      | YES  | MUL | NULL    |                |
| modifiedbyagent_id | int(11)      | YES  | MUL | NULL    |                |
+--------------------+--------------+------+-----+---------+----------------+
17 rows in set (0.001 sec)

archireef is missing three very important columns in the spdataset table: data, uploaderstatus, and rowresults.

Even accessing the datasets via the Workbench button from the Navigation Menu results in an error
archireef_spdataset

I made sure this was not a problem on databases that were configured as Specify expects.
To test this you can:

  • Create a WorkBench dataset (Any Base Table)
  • (should be optional) upload the dataset
  • Try and merge the agent who created the Dataset

@melton-jason melton-jason closed this as not planned Won't fix, can't repro, duplicate, stale Jul 31, 2023
@bronwyncombs
Copy link
Author

@melton-jason thank you for looking into this!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Bug Incorrect behavior of the product 2 - Merging res:wontfix Design decision or behaviour that won't be changed. Use this alongside "Close as not planned"
Projects
None yet
Development

No branches or pull requests

2 participants