I have a development machine and a production server. I did a lot of changes and upgrades, then when attempting to upload my changes from my development machine and do a dev/build/ I get this:
http://pastehtml.com/view/az3nbmcc9.html
In short:
[Warning] pg_query(): Query failed: ERROR: check constraint "SiteTree_ClassName_check" is violated by some row
Trace:
pg_query(Resource id #54,ALTER TABLE "SiteTree" ALTER COLUMN "ClassName" TYPE varchar(255) , ALTER COLUMN "ClassName" DROP DEFAULT, ALTER COLUMN "ClassName" SET default 'SiteTree', DROP CONSTRAINT "SiteTree_ClassName_check", ADD CONSTRAINT "SiteTree_ClassName_check" check ("ClassName" in ('SiteTree', 'Page', 'FCategoryPage', 'FProductPage', 'FTopCategoryPage', 'FishTankHolder', 'HomePage', 'ErrorPage', 'RedirectorPage', 'VirtualPage', 'FishTankPage')))
Line 187 of PostgreSQLDatabase.php
I'm no SQL expert, I have no clue what this means.
I exported the database and download to my computer, which gave the same error there. This is a PostgreSQL database mind you. What is the actual error here?
And what does the check mean?
check ("ClassName" in ('SiteTree', 'Page', 'FCategoryPage', 'FProductPage', 'FTopCategoryPage', 'FishTankHolder', 'HomePage', 'ErrorPage', 'RedirectorPage', 'VirtualPage', 'FishTankPage'))
means That it looks for a column named "ClassName" in each of those tables? In case many of those ain't even a table (like Page) which I suppose is due to not having any extra db fields. And only the 'SiteTree' has a 'ClassName' column.