[SOLVED] g2_ExternalIdMap Dropped

jeepinaround

Joined: 2003-06-14
Posts: 5
Posted: Thu, 2011-01-20 05:25


Gallery version (not just "2"): 2.3.1 core 1.3.0.1
PHP version (e.g. 5.1.6): 5.2.14 cgi
PHPInfo Link (see FAQ): http://www.coloradorockhoppers.org/gallery2/phpinfo.php
Webserver (e.g. Apache 1.3.33): Apache/2.2.16 (Unix)
Database (e.g. MySql 5.0.32): mysqlt 5.1.51
Activated toolkits (e.g. NetPbm, GD): ArchiveUpload, Exif, Getid3, LinkItemToolkit, Gd
Operating system (e.g. Linux): Linux
Browser (e.g. Firefox 2.0): Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.47 Safari/534.13

I inadvertently dropped my table while trying to delete an entry in the g2_ExternalIdMap Yeah I know oops. Can some one give me a sql command to recreate this table? Or if I go back to my installer and I delete the existing tables and do a fresh install on the database portion of the installer, I will lose all current user data and image data that has existed in my gallery for years correct?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2011-01-20 12:30

ExternalIdMap is used to keep track of users from an embedding CMS or other user app. So you'll want to remap those users from any external app.

DROP TABLE IF EXISTS `g2_ExternalIdMap`;
CREATE TABLE IF NOT EXISTS `g2_ExternalIdMap` (
  `g_externalId` varchar(128) NOT NULL,
  `g_entityType` varchar(32) NOT NULL,
  `g_entityId` int(11) NOT NULL,
  PRIMARY KEY  (`g_externalId`,`g_entityType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

if you're not using InnoDB replace the engine with:
ENGINE=MyISAM DEFAULT CHARSET=latin1;

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
jeepinaround

Joined: 2003-06-14
Posts: 5
Posted: Thu, 2011-01-20 15:06

Yes I switched to a new forum and needed to empty the table for the new bridge and inadvertently dropped the table. That was the error I was getting. thank you for the SQL query that worked and fixed my problem