{"comment":{"created_at":"2011-10-19T14:48:01Z","body":"- budou existovat 3 funkce porovnavajici to, co je v databazi a to co je v install adresari.\r\nmanage_table_structure()\r\nparametry: $nazev_tabulky, $sql_link, $relativni_cesta_do_install_adreare, nepovinny parametr $testovaci_sql_link\r\n1) pokud bude nastaveny $testvaci_sql_link tak test probehne v nejake jine databazi specialne urcenou pro hrani abys nedelal bordel v ostre databazi\r\n2) vytvorim tabulku podle dumpu ze sql a nazvu ji treba 'manage_table_test_hot'.$random a udelam ji taky podle fajlu 'manage_table_test_file'.$random\r\n3) porovnam tabulky (da se udelat crc soucet tabulky - nevim jestli to jde aplikovat i n a prazdnou tabulku, ale pokud ne tak bych v nejhorsim z tec dvou testovacich tabulek udelal zase dump u ktereho uz ale budu moct porovnavat stringy)\r\n\r\nkuba:\r\ndobre, takze ted mame dva stringy ktere by se mely lisit jen v nazvu tabulky :D\r\na casu vygenerovani, ktery je v nejakem komentari nahore a pripadne databazi, pokud to test delam v jine\r\ncas dumpu porovnavat nebudu, vemu to az od prvniho prazdneho radku\r\nnazev tabulky nahradim\r\na pak porovnam stringy\r\n\r\nmanage_table_data()\r\nv te data funkci ... tam jde jen o to, jestli jde zasunout do te tabulky ty hodnoty, ktere se insertuji pri instalaci\r\ntestovaci data pro zacatek odhadnout.\r\njen tak z hlavy. chtelo by to uvodni data k hlavnimu adminovi, mozna root stranku, aby sme ji nemuseli resit ve scriptech, a plno hodnot do glued sesttings\r\n\r\n\r\nbtw, kdyz budes mit ty docasne testovaci tabulky udelane tak na ne vypustis manage_table_data ... kdy zkusis jestli jdou do nich dat inserty tak jak je mas nadefinovane ... mohlo by se totiz stat ze v instalacnich .sql souborech updatnes databazovou strukturu ale zapomenes updatovat inserty jestli tam pri instalaci nejake jsou\r\ntak aby se to chytlo timhletim\r\n\r\na kdyz pak budeme mit testovaci data tak ta budou treba v uri.test.sql","updated_at":"2011-10-19T14:48:01Z","url":"https://api.github.com/repos/Vaizard/Glued/issues/comments/2456649","id":2456649,"user":{"avatar_url":"https://secure.gravatar.com/avatar/5a7e7caa340a81a495a545be3dc8a8d9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5a7e7caa340a81a495a545be3dc8a8d9","url":"https://api.github.com/users/pohadkar","id":427799,"login":"pohadkar"}},"action":"created","issue":{"number":55,"created_at":"2011-04-25T11:27:32Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"1. glued2/install cleanup\r\n - sort subdirectories into categories (i think we currently have module, library, bone, skin (?) ... also add virtual category for core-modules virtual package)\r\n - ignore ~sql directory, it will be deleted later but not now!\r\n2. cleanup ~sql directory\r\n - check if uri.sql and authnz_users.sql are up to date (if not update them manually). do not delete them, at least not uri.sql which already has comments.\r\n - delete the rest, export current tables. split them into files according to the authnz_users.sql example.\r\n3. put sql files into their directories, i.e. put authnz_users.sql into module/authnz directory.\r\n4. write the following functions (lets assume i'm delaing with the authnz_users table):\r\n  - manage_table_structure() - will compare the structure, indexes, etc. current authnz_users in database\r\n  - manage_table_data() - will test if insert statements of default data will work with the sql file(s) in the installation directory\r\n  - manage_table_comments() - will parse the comments as in authnz_users.sql and store them in an array.\r\n\r\n5. add a manage module page in administration (root)\r\n  - ui to compare sql files and database (by default checks all tables, each table will have a reload button to recheck spearately)\r\n  - ui to test default data to be inserted with sql files (create table with temp. name, try the insert see if it fails?)\r\n  - ui to display table structure for different modules, for each row display the comment as parsed by manage_table_comments() \r\n\r\npart of manage module ... ","comments":2,"title":"add function to compare database structure in database and in sql (install) files","updated_at":"2011-10-19T14:48:01Z","url":"https://api.github.com/repos/Vaizard/Glued/issues/55","id":809400,"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/5a7e7caa340a81a495a545be3dc8a8d9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5a7e7caa340a81a495a545be3dc8a8d9","url":"https://api.github.com/users/pohadkar","id":427799,"login":"pohadkar"},"milestone":{"number":5,"created_at":"2011-08-19T12:27:26Z","due_on":null,"title":"0.2","creator":{"avatar_url":"https://secure.gravatar.com/avatar/6eb8dd95af5a6e279c988055297244be?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"6eb8dd95af5a6e279c988055297244be","url":"https://api.github.com/users/killua-eu","id":410734,"login":"killua-eu"},"url":"https://api.github.com/repos/Vaizard/Glued/milestones/5","open_issues":17,"closed_issues":3,"description":null,"state":"open"},"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/6eb8dd95af5a6e279c988055297244be?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"6eb8dd95af5a6e279c988055297244be","url":"https://api.github.com/users/killua-eu","id":410734,"login":"killua-eu"},"html_url":"https://github.com/Vaizard/Glued/issues/55","labels":[{"name":"feature req.","url":"https://api.github.com/repos/Vaizard/Glued/labels/feature+req.","color":"a6ff9e"}],"state":"open"},"legacy":{"issue_id":809400,"comment_id":2456649}}