Rename schema

Robi Navarro
2019-01-18 08:24

1. drop triggers of old database (you can find the query in the Stored Procedures section)

2. Create new schema

create schema ´nelsoft_old´;

3. run resulting query from the following query in workbench

select concat('alter table ','nelsoft','.´',table_name, '´ rename to ','nelsoft_old','.´', table_name,'´;') as 'rename' from information_schema.tables where table_schema = 'nelsoft';

4. copy the result as unquoted

5. run all queries

6. add back the triggers

Average rating: 0 (0 Votes)

You can comment this FAQ