I have an LDAP feed that I run nightly and it makes several tables that run a lot of our internal websites. I simply get about 40 fields times 80K employees.
The tables get overridden every night on purpose because it is used for our SAML2 SSO and other stuff and don't want old employees to be able to login if there is a code breakdown somewhere.
So I guess what I trying to figure out is that if I ALTER a table how do I store or transfer the old data to an exemployee table?
DROP TABLE IF EXISTS testgiver.ldap_extr; CREATE TABLE testgiver.ldap_extr SELECT ldap_full_forever.cn, ldap_full_forever.uid, ldap_full_forever.businesscategory, ldap_full_forever.mail FROM ldap_full_forever WHERE ldap_full_forever.uid NOT IN ( SELECT ldap_tiny.uid FROM ldap_tiny WHERE ldap_tiny.uid is not null)
In this example I have already created an extra table - full_forever that never drops an employee on update. This is cross-referenced against a current table and then another table gets created with that subset. Is that the best/easiest way?