In order to not lose data in declarative mode, please support an attribute/directive for tables/columns called rename_as, so Atlas will rename table/column name x as y, instead of dropping/recreating it with a new name.
During planning, Atlas should also pre-check that no two tables have the same name/rename_as value in the same schema or same column name/rename_as value in the same table.
Example:
table "remarks_table" {
schema = schema.myschema
rename_as = "comments_table"
column "ID" {
null = false
type = int
unsigned = true
auto_increment = true
}
column "remarks" {
rename_as = "comments"
null = true
type = varchar(250)
}
primary_key {
columns = [column.ID]
}
}