DVBProject / DVB-I-Reference-CSR

Project to create a DVB-I Central Service Registry for DVB-I client service (list) discovery
MIT License
8 stars 3 forks source link

db.sql initialisation file generates some errors #10

Closed peterl1000 closed 1 year ago

peterl1000 commented 2 years ago

The database initialisation file generates some errors when run. Commands and output - see errors towards the end:

mysql> DROP DATABASE dvb_i_csr;
Query OK, 12 rows affected (0,13 sec)

mysql> source db.sql;
Query OK, 1 row affected, 2 warnings (0,02 sec)

Database changed
Query OK, 0 rows affected (0,02 sec)

Query OK, 0 rows affected (0,04 sec)

Query OK, 0 rows affected (0,03 sec)

Query OK, 0 rows affected (0,03 sec)

Query OK, 0 rows affected (0,02 sec)

Query OK, 0 rows affected (0,04 sec)

Query OK, 0 rows affected (0,04 sec)

Query OK, 0 rows affected (0,07 sec)

Query OK, 0 rows affected (0,04 sec)

Query OK, 0 rows affected (0,03 sec)

Query OK, 0 rows affected (0,03 sec)

Query OK, 0 rows affected (0,01 sec)

Query OK, 0 rows affected (0,02 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,04 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,01 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,05 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,03 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,08 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,04 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,07 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,02 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,05 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,01 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,04 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,02 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,05 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,01 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,05 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,01 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,04 sec)
Records: 0  Duplicates: 0  Warnings: 0

ERROR 1060 (42S21): Duplicate column name 'Status'
ERROR 1060 (42S21): Duplicate column name 'Providers'
ERROR 1091 (42000): Can't DROP 'Organizations'; check that column/key exists
Query OK, 0 rows affected (0,03 sec)
Records: 0  Duplicates: 0  Warnings: 0

ERROR 1060 (42S21): Duplicate column name 'Email'
ERROR 1060 (42S21): Duplicate column name 'Session'
Query OK, 0 rows affected (0,02 sec)
Records: 0  Duplicates: 0  Warnings: 0

ERROR 1060 (42S21): Duplicate column name 'Language'
ERROR 1060 (42S21): Duplicate column name 'Icons'
Query OK, 1 row affected (0,00 sec)

Query OK, 1 row affected (0,00 sec)

Query OK, 1 row affected (0,00 sec)

Query OK, 1 row affected (0,00 sec)

mysql> 
juhajoki commented 2 years ago

thanks, the SQL init file needs some cleanup. The db should work however, but we will check.

sofia-tsa commented 2 years ago

Those are caused by the alter table-commands to modify the DB structure if one is upgrading from a previous version, those errors can be ignored if you are creating a new database. I could move those to a different different script file perhaps, update.sql for updating from a previous schema and the db.sql for creating a new database.

There shouldn't be any more database schema changes, hopefully this should be the final DB schema.

peterl1000 commented 2 years ago

OK, thanks. Indeed the installation appeared to be successful. Documentation could be updated to explain that these errors can be ignored.

sofia-tsa commented 2 years ago

Readme has been updated