Table Editor
Create a new table or change an existing one in a dialog. Rowpilot writes the CREATE TABLE and ALTER TABLE statements for you and shows them before anything runs.
Open the editor
Right-click in the schema tree in the right sidebar:
Edit tableon a table opens it with its columns, indexes and foreign keysNew tableon a schema starts an empty table. When the database has no schemas, right-click the database
Columns
Click a column to edit it, or click Add column at the end of the list.
- Name and Type. Pick the type from the list or type your own
- Default value
- Not null, Primary key, Unique and Index
- References makes the column a foreign key. Pick the column of another table and what happens On delete
- Advanced has the identity or auto increment setting and the column comment
The Indexes and Foreign keys tabs list what you have set on the columns.
SQL preview
The SQL preview at the bottom of the dialog shows the statements for your changes and updates as you edit. You can copy them and run them yourself.
Apply the changes
Click Create or Apply changes. The statements run under the transaction mode of the data source, and the footer of the dialog tells you what will happen:
| Mode | What happens |
|---|---|
| Guard | You see the SQL and choose Commit or Rollback |
| Manual | The statements run in your open transaction. Commit it to keep the change |
| Auto | The statements run as soon as you click the button |
Some databases commit table changes at once and cannot roll them back. The footer says so, and the transaction mode makes no difference there.
Limits
- The Schema editing column in Features by database shows which data source types have the table editor
- On an existing column you cannot change the keys and the reference in the dialog. Write that change in the query editor
- The editor works with tables. It does not open views
