SURFnet / rd-sram-integration

Research Drive / SURF Research Access Management Integration
2 stars 3 forks source link

Check for uniq records #195

Closed T0mWz closed 1 year ago

T0mWz commented 1 year ago

Ensure that records are uniq for user-group relation;

MariaDB [miskatonic_tst_oc]> select * from oc_fg_groups;
+----------------------------------------------------+
| gid                                                |
+----------------------------------------------------+
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) |
+----------------------------------------------------+
1 row in set (0.001 sec)

MariaDB [miskatonic_tst_oc]> select * from oc_fg_group_user;
+----------------------------------------------------+------------------+
| gid                                                | uid              |
+----------------------------------------------------+------------------+
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | wezep001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | zoete001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | wezep001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | wezep001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | zoete001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | zoete001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | wezep001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | zoete001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | zoete001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | wezep001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | zoete001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | wezep001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | wezep001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | zoete001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | wezep001@surf.nl |
| TestGroup (uniharderwijk_surfdrive_test) (SRAM CO) | zoete001@surf.nl |
+----------------------------------------------------+------------------+
16 rows in set (0.003 sec)
navid-shokri commented 1 year ago

@soltanireza65 Can you check this Issue?

soltanireza65 commented 1 year ago

@shokri-navid Yes i will

soltanireza65 commented 1 year ago

I think the best way to handle this is to update the migration file to make 2 columns qunit together, instead of checking it in the backend, (also this is the current way that we are using and its somehow not working)

T0mWz commented 1 year ago

Maybe also nicer to user the iSchemaMigration option instead of the current migration. Where we not using MyISAM for example and with the iSchemaMigration you fix it for all type of DBs; Example of an iSchemaMigration can you find here; https://github.com/owncloud/oauth2/blob/master/appinfo/Migrations/Version20161122085340.php#L7

soltanireza65 commented 1 year ago

Maybe also nicer to user the iSchemaMigration option instead of the current migration. Where we not using MyISAM for example and with the iSchemaMigration you fix it for all type of DBs; Example of an iSchemaMigration can you find here; owncloud/oauth2@master/appinfo/Migrations/Version20161122085340.php#L7

ooo it uses XML marckups as SQL schemas 😃😃😃 I have never seen it before, great...