Forum: bugs
Monitor Forum | | RE: bug on insert [ reply ] By: Jean-Max Reymond on 2009-04-22 08:19 | [forum:1004880] |
|
an sed command to fix this bug: sed -e '/INSERT/s/)"/")/' -e '/INSERT/s/ (/" ("/' |
|
| bug on insert [ reply ] By: Jean-Max Reymond on 2009-04-20 19:23 | [forum:1004874] |
|
a little bug when generating INSERT this line is not correct: INSERT INTO "glpi_users_profiles (id", "fk_users", "fk_profiles", "fk_entities", "recursive", "dynamic)" VALUES mysql: CREATE TABLE glpi_users_profiles ( ID int(11) NOT NULL auto_increment, FK_users int(11) NOT NULL default '0' COMMENT 'RELATION to glpi_users (ID)', FK_profiles int(11) NOT NULL default '0' COMMENT 'RELATION to glpi_profiles (ID)', FK_entities int(11) NOT NULL default '0' COMMENT 'RELATION to glpi_entities (ID)', recursive smallint(6) NOT NULL default '1', `dynamic` smallint(6) NOT NULL default '0', PRIMARY KEY (ID), KEY FK_users (FK_users), KEY FK_profiles (FK_profiles), KEY FK_entities (FK_entities), KEY recursive (recursive) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Contenu de la table 'glpi_users_profiles' -- INSERT INTO glpi_users_profiles (ID, FK_users, FK_profiles, FK_entities, recursive, dynamic) VALUES (2, 2, 4, 0, 1, 0), (3, 3, 1, 0, 1, 0), (4, 4, 4, 0, 1, 0), (5, 5, 2, 0, 1, 0); after conversion: -- -- Generated from mysql2pgsql.perl -- http://gborg.postgresql.org/project/mysql2psql/ -- (c) 2001 - 2007 Jose M. Duarte, Joseph Speigle -- -- warnings are printed for drop tables if they do not exist -- please see http://archives.postgresql.org/pgsql-novice/2004-10/msg00158.php -- ############################################################## DROP TABLE "glpi_users_profiles" CASCADE\g DROP SEQUENCE "glpi_users_profiles_id_seq" CASCADE ; CREATE SEQUENCE "glpi_users_profiles_id_seq" ; CREATE TABLE "glpi_users_profiles" ( "id" integer DEFAULT nextval('"glpi_users_profiles_id_seq"') NOT NULL, "fk_users" int NOT NULL default '0' , "fk_profiles" int NOT NULL default '0' , "fk_entities" int NOT NULL default '0' , "recursive" smallint NOT NULL default '1', "dynamic" smallint NOT NULL default '0', primary key ("id") ) ; -- -- Contenu de la table 'glpi_users_profiles' -- INSERT INTO "glpi_users_profiles (id", "fk_users", "fk_profiles", "fk_entities", "recursive", "dynamic)" VALUES (2, 2, 4, 0, 1, 0), (3, 3, 1, 0, 1, 0), (4, 4, 4, 0, 1, 0), (5, 5, 2, 0, 1, 0); COMMENT ON COLUMN "glpi_users_profiles". "fk_users" IS 'RELATION to glpi_users (ID)'; COMMENT ON COLUMN "glpi_users_profiles". "fk_profiles" IS 'RELATION to glpi_profiles (ID)'; COMMENT ON COLUMN "glpi_users_profiles". "fk_entities" IS 'RELATION to glpi_entities (ID)'; CREATE INDEX "glpi_users_profiles_fk_users_idx" ON "glpi_users_profiles" USING btree ("fk_users"); CREATE INDEX "glpi_users_profiles_fk_profiles_idx" ON "glpi_users_profiles" USING btree ("fk_profiles"); CREATE INDEX "glpi_users_profiles_fk_entities_idx" ON "glpi_users_profiles" USING btree ("fk_entities"); CREATE INDEX "glpi_users_profiles_recursive_idx" ON "glpi_users_profiles" USING btree ("recursive"); |
|

