For all of the other user's out there that are going to run into this same problem, I thought I would provide a better solution that "down grade and use old version". Here is a script that can be run against the previous version and will upgrade to the latest schema and data model.
Thanks for all of your help Devart.
This took me all of an hour to write and I am sure that I won't be the only one to use it.
Thanks,
Lee
--Create function used to generate UUID
CREATE OR REPLACE FUNCTION uuid_generate_v4()
RETURNS uuid
AS '$libdir/uuid-ossp', 'uuid_generate_v4'
VOLATILE STRICT LANGUAGE C;
--Drop constraints that will cause upgrade to fail.
ALTER TABLE aspnet_membership DROP CONSTRAINT aspnet_membership_userid_ref;
ALTER TABLE aspnet_profiles DROP CONSTRAINT aspnet_profiles_userid_ref;
ALTER TABLE aspnet_usersinroles DROP CONSTRAINT aspnet_usersinroles_userid_ref;
ALTER TABLE aspnet_usersinroles DROP CONSTRAINT aspnet_usersinroles_roleid_ref;
--Upgrade function that will loop through all the userids and roleids and upgrade specific tables.
create or replace function upgrade_aspnet_tables() returns void
AS
$BODY$
DECLARE
user record; --Used to get information from aspnet_users table
role record; --Used to get information from aspnet_roles table
newid uuid; --Used to hold new uuid for user and role;
BEGIN
--Loop through all of the userids
for user in (SELECT userid from aspnet_users)
LOOP
--Generate a new uuid value for the userid
newid = uuid_generate_v4();
--update all tables with the userid in it
update aspnet_users set userid=newid where userid=user.userid;
update aspnet_usersinroles set userid=newid where userid=user.userid;
update aspnet_membership set userid=newid where userid=user.userid;
update aspnet_profiles set userid=newid where userid=user.userid;
END LOOP;
--Loop through all of the roles
for role in (SELECT roleid from aspnet_roles)
LOOP
--Generate a new uuid value for the roleid
newid = uuid_generate_v4();
--update all tables with the roleid in it
update aspnet_roles set roleid=newid where roleid=role.roleid;
update aspnet_usersinroles set roleid=newid where roleid=role.roleid;
END LOOP;
END
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
--Call the upgrade function
select upgrade_aspnet_tables();
--Recreate all of the constraints that were dropped in beginning
ALTER TABLE aspnet_usersinroles
ADD CONSTRAINT aspnet_usersinroles_roleid_ref FOREIGN KEY (roleid)
REFERENCES aspnet_roles (roleid) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION;
ALTER TABLE aspnet_usersinroles
ADD CONSTRAINT aspnet_usersinroles_userid_ref FOREIGN KEY (userid)
REFERENCES aspnet_users (userid) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION;
ALTER TABLE aspnet_membership
ADD CONSTRAINT aspnet_membership_userid_ref FOREIGN KEY (userid)
REFERENCES aspnet_users (userid) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION;
ALTER TABLE aspnet_profiles
ADD CONSTRAINT aspnet_profiles_userid_ref FOREIGN KEY (userid)
REFERENCES aspnet_users (userid) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION;
--Create new tables
CREATE TABLE aspnet_sitemap (
nodeid INT,
applicationname VARCHAR(255) NOT NULL,
url VARCHAR(4096),
name VARCHAR(255),
description VARCHAR(512),
roles VARCHAR(512),
parentnodeid INT DEFAULT NULL,
PRIMARY KEY (nodeid, applicationname),
CONSTRAINT aspnet_sitemap_nodeid_fk FOREIGN KEY (parentnodeid, applicationname) REFERENCES aspnet_sitemap(nodeid, applicationname)
);
CREATE TABLE aspnet_webevent_events (
eventid CHAR(32) PRIMARY KEY DEFAULT '',
eventtimeutc timestamp NOT NULL,
eventtime timestamp NOT NULL,
eventtype VARCHAR(256),
eventsequence DECIMAL(19, 0) NOT NULL,
eventoccurrence DECIMAL(19, 0) NOT NULL,
eventcode INT NOT NULL,
eventdetailcode INT NOT NULL,
message VARCHAR(1024),
applicationpath VARCHAR(256),
applicationvirtualpath VARCHAR(256),
machinename VARCHAR(256),
requesturl VARCHAR(1024),
exceptiontype VARCHAR(256),
details text
);
CREATE TABLE aspnet_personalization (
userid VARCHAR(40) DEFAULT NULL,
path VARCHAR(255) DEFAULT NULL,
applicationname VARCHAR(255) DEFAULT NULL,
personalizationblob bytea DEFAULT NULL,
CONSTRAINT aspnet_personalization_userid_fk FOREIGN KEY (userid) REFERENCES aspnet_users(userid)
);