Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

SQL file errors #3

Open
ghost opened this issue Jan 5, 2022 · 0 comments
Open

SQL file errors #3

ghost opened this issue Jan 5, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 5, 2022

Bug:
When trying to run db script (samm.sql), the script errors out:

Results:
script cannot create foreign key relationship due to table not in existence

ubuntu@ip-172-31-24-36:~/dashboard-webapp$ sudo mysql -u root -p -D samm < samm.sql
Enter password:
ERROR 1824 (HY000) at line 1248: Failed to open the referenced table 'role_copy'
ubuntu@ip-172-31-24-36:~/dashboard-webapp$

Expected results:
command runs without errors

ubuntu@ip-172-31-24-36:~/dashboard-webapp$ sudo mysql -u root -p -D samm < samm.sql
Enter password:
ubuntu@ip-172-31-24-36:~/dashboard-webapp$

Issues:

  1. Alter table command references non-existent table (roles_copy) should be (roles)
  2. Roles table does not have primary key
  3. Roles table has duplicated values in the 'id' column

PR will follow

@ghost ghost mentioned this issue Jan 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants