Problem with copying security tables from dev to prod

I generated new security tables via the security module in Dev. I pushed the sc sec apps to production now I’m trying to copy the newly created sec_users, sec_apps etc. to production. I’m starting with sec_users because that is a parent table right? to sec_groups_users. i thought that I may have needed to push the parent sec_users to prod first, but I still get the error.

CREATE TABLE IF NOT EXISTS prod.sec_users LIKE dev.sec_users;

INSERT prod.sec_users

SELECT * from dev.sec_users;

ERRORED OUT –

Can’t create table prod.sec_users (errno: 150 “Foreign key constraint is incorrectly formed”) ([Details…]

the only entry in the dev.sec_users table is the one SC created for admin during the security module creation. None of the other dev.sec_ tables have been copied to prod yet.

I have copies of the old prod tables with different names in the prod database. I am planning on repopulating after I get the new tables created. I had tried this process before, but I repopulated the new tables while they were still in dev and I got the same error message.
Prod is down while I get this figured out.

Here a post about your question:

Thanks, but it didn’t exactly match the problem. I was trying to move them from dev to prod. They were created by Scriptcase automatically via the security module so there shouldn’t have been a problem with them.

Update - instead of creating the security tables in dev and then moving them to the prod database, I created them directly in production.