There are so many views partially because I find it easier to setup a view and then create an object with my DB abstraction library than to create custom JOIN queries all over the code. If it were a larger operation with more than me as the developer I may not do it this way, but it's a convenience.
Can't you just re-run the CREATE VIEW commands after the base tables are copied?
I suppose I could. But I was trying to do it with a quick and dirty cron statement. Then again I guess I could pipe in a call to import the views.
What dump parameters are you using? At the old job we had at least one view and I don't recall any problems restoring from it. But yeah, why so many views?
You see the statement in my original post. I wasn't using any parameters. I do have another cron that backsup the databases but I have to specifically ignore all the views individually (which is a pain in my ass). And it's not like I haven't done research on this. I've searched the motha-fuckin web and it hates me. I'm convinced that mysqldump is just deficient when it comes to views.
Was it a conditional comment? I swear half of a MySQL dump is conditional comments.
And maybe I just haven't found the right one yet.