Changes the column name or table constraints, this method overrides the previous value ### Example ``` # #[cfg(any(feature = "postgresql", feature = "sqlite", feature = "mysql"))] # { # use sql_query_builder as sql; let query = sql::AlterTable::new() .alter_table("users") .rename("COLUMN address TO city") .to_string(); # let expected = "ALTER TABLE users RENAME COLUMN address TO city"; # assert
(mut self, action: &str)
| 341 | /// RENAME COLUMN name TO full_name |
| 342 | /// ``` |
| 343 | pub fn rename(mut self, action: &str) -> Self { |
| 344 | #[cfg(feature = "mysql")] |
| 345 | { |
| 346 | let action = AlterTableActionItem(AlterTableOrderedAction::Rename, action.trim().to_string()); |
| 347 | push_unique(&mut self._ordered_actions, action); |
| 348 | } |
| 349 | #[cfg(not(feature = "mysql"))] |
| 350 | { |
| 351 | self._rename = action.trim().to_string(); |
| 352 | } |
| 353 | |
| 354 | self |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | #[cfg(any(doc, feature = "postgresql", feature = "sqlite"))] |