Fixed a couple of bugs that were bombing the data migration.

slimupdates
Diva Canto 2009-12-29 16:51:59 -08:00
parent 88d2df597e
commit 28516e2648
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ CREATE TABLE `UserAccounts` (
`LastName` VARCHAR(64) NOT NULL, `LastName` VARCHAR(64) NOT NULL,
`Email` VARCHAR(64), `Email` VARCHAR(64),
`ServiceURLs` TEXT, `ServiceURLs` TEXT,
`Created` DATETIME `Created` INT(11)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT; COMMIT;

View File

@ -1,5 +1,5 @@
BEGIN; BEGIN;
INSERT INTO UserAccounts (UserID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, lastname AS LastName, email as Email, CONCAT('AssetServerURI=', userAssetURI, ' InventoryServerURI=', userInventoryURI, ' GatewayURI= HomeURI=') AS ServiceURLs, created as Created FROM users; INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, lastname AS LastName, email as Email, CONCAT('AssetServerURI=', userAssetURI, ' InventoryServerURI=', userInventoryURI, ' GatewayURI= HomeURI=') AS ServiceURLs, created as Created FROM users;
COMMIT; COMMIT;