
mir at datanom
Sep 28, 2011, 9:14 AM
Views: 861
Permalink
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 28 Sep 2011 07:43:55 +0200 Ingo Belka <ingo_belka [at] grimmen> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Michael, > > sorry I was to fast. I did overseen these error messages while > applying the 1.2.10b.sql, because someone disturbed me: > What out does the following query give? select schema_major, schema_minor, schema_patch, schema_name from awl_db_revision; Before applying 1.2.10b you should see: schema_major | schema_minor | schema_patch | schema_name - --------------+--------------+--------------+------------- 1 | 1 | 0 | Dawn 1 | 2 | 7 | Juillet 1 | 2 | 8 | Août 1 | 2 | 9 | Septembre 1 | 2 | 10 | Octobre After applying 1.2.10b you should see: schema_major | schema_minor | schema_patch | schema_name - --------------+--------------+--------------+------------- 1 | 1 | 0 | Dawn 1 | 2 | 7 | Juillet 1 | 2 | 8 | Août 1 | 2 | 9 | Septembre 1 | 2 | 10 | Octobre 1 | 2 | 10 | Octobre But none the less the following set of commands should solve your issue: (use attached patch instead) ALTER TABLE dav_binding ADD UNIQUE( dav_name ); ALTER TABLE principal ADD CONSTRAINT unique_user UNIQUE (user_no); - -- Ensure we don't refer to any newer, duplicated collections UPDATE caldav_data SET collection_id = (SELECT min(c2.collection_id) FROM collection c1, collection c2 WHERE c1.dav_name = c2.dav_name AND c1.collection_id = caldav_data.collection_id) WHERE collection_id > (SELECT min(c2.collection_id) FROM collection c1, collection c2 WHERE c1.dav_name = c2.dav_name AND c1.collection_id = caldav_data.collection_id); -- Ensure the newer duplicated collections don't exist any longer DELETE FROM collection WHERE collection_id > (SELECT min(collection_id) FROM collection c2 WHERE c2.dav_name = collection.dav_name); -- Ensure we can't add more duplicates in the future ALTER TABLE collection ADD CONSTRAINT unique_path UNIQUE (dav_name); SELECT new_db_revision(1,2,10, 'Octobre' ); - -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael <at> rasmussen <dot> cc http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E mir <at> datanom <dot> net http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C mir <at> miras <dot> org http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917 - -------------------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk6DR+4ACgkQQQOPluUB9RyplwCgy5YAuBWYAG08z1pbHH+WHq/K 3lkAoLsUyksMLRCydB99aJeqHThTNnzg =Ii+S -----END PGP SIGNATURE-----
|