You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adds a new column to a database table corresponding to the provided class name.
23
+
*
24
+
* @param {string} className - The name of the class whose table will be altered. The table name is derived by converting the class name from camelCase to snake_case.
25
+
* @param {string} columName - The name of the new column to add.
26
+
* @param {string} type - The SQL data type of the new column (e.g., `"INTEGER"`, `"VARCHAR(255)"`).
27
+
* @param {boolean} notNull - Whether the new column should be defined as NOT NULL.
28
+
* @param {string} [defaultValue] - Optional default value for the new column. If supplied, the default is applied unless `deleteDefault` is true.
29
+
* @param {boolean} [deleteDefault] - When true and a default value is supplied, the default is dropped after the column is added.
30
+
* @returns {Promise<boolean>} A promise that resolves to `true` if all SQL statements executed successfully, otherwise `false`.
* This method is used to remove a column from an existing table in the database.
65
-
* @param className
66
-
* @param columName
67
-
* @protected
71
+
* Deletes a column from the database table that corresponds to the given class name.
72
+
*
73
+
* @param{string} className The name of the class representing the table. The method converts this name from camelCase to snake_case to derive the actual table name.
74
+
* @param{string} columName The name of the column to be removed from the table.
75
+
* @returns {Promise<boolean>} A promise that resolves to `true` when the column has been successfully dropped from all executed queries; otherwise it resolves to `false`.
0 commit comments