Add new columns to the source database directly through the powertable app. This feature eliminates the need for users to engage with the database directly, enhancing security and efficiency.
Please ensure you have the required permissions to the database you are connected to, as you are adding a column directly to the source database.
Consider the following example where we will add the Status column to the Products table.
To add a new column to the source table, select PowerTable > Insert Column > Database Column.
In the side panel that opens, enter the column name and its data type. Consider you're adding a text column so you select the VARCHAR data type.
Select Not null to prevent null values in the column. When this option is enabled, you must specify a default value so that if no value is available, the default value is used.
You can optionally specify a default value for the column. Default values can be either manual or formula-based:
Select Manual to specify a static default value.
Select Formula to derive the default value using a configurable formula instead of a static value.
You can optionally specify a default value for the column, regardless of whether the column is configured as nullable or non-nullable. For more information about configuring default values, see Default value.
Use Length to change the limit for the number of characters in this column.
Select Save to create the database column.
When Not null is selected:
The default value is automatically populated in the newly created column and in any rows added in the future.
This ensures that a valid value is always available when no value is explicitly provided.
You can later update these values.
When Not null is unselected:
When Not null is cleared, the column accepts null values. When the column is created, the existing rows are left blank, even if a default value is set.
However, when new rows are added, the configured default value is automatically populated in the column.