Screens: Projects

DDL approval

DDL approval is the step that members of a role with DDL Restriction go through in an account project when they apply table changes to the database. Such a member cannot run DDL directly and sends a request instead, and a member who can approve reviews and runs it in the Project railDDL Approval panel on the right rail. Roles and permissions are explained in Collaboration and permissions.

Where you can use itWebDesktopWithout signing inSigned inLocal projectsAccount projects

What's on the screen

No.NameDescription
1Rail buttonThe Project railDDL Approval button on the right rail. It shows a count when there are pending requests you can approve.
2Pending and Completed tabsPending requests, and requests that were approved, rejected or withdrawn. All requests in the project are listed.
3Refresh buttonReloads the list.
4Request Target columnThe connection, database and schema of the request. Click a row to open the DDL Approval Review window.
5Requester columnWho sent the request. Not shown to members whose role has DDL Restriction.
6Status columnOne of Pending, Approved, Rejected and Cancelled.

Who requests and who approves

WhoWhat they can do
RequesterA member whose role has DDL RestrictionCannot run DDL and sends requests instead. Withdraws their own requests. Table changes this member saves are not shared with the team and are kept separately.
ApproverThe owner can always approve. Otherwise, a member whose own role has All Permissions or does not have DDL Restriction, and, if the requester's role has a Approver Role, whose role is that role or higher.Edits the DDL of a request and runs it on approval, or rejects it.
  • Roles rank in the order Owner, Manager, DBA, Member. For example, if the approver role of the Member role is Manager, only the owner and managers approve requests of the Member role.
  • If the Approver Role is left empty, rank is not checked.
  • Whether you can approve is decided by the NeoSQL server for each request. Requests you cannot approve are read-only in the DDL Approval Review window.

Turning on DDL restriction

  1. With the owner's account, open the Project settingsRole Permissions tab and open the tab of the role to restrict.
  2. Check the DDL Restriction checkbox (1). That role's Connection Permission item (2) is turned off and can no longer be checked.
  3. Save the project settings window. Members of that role can no longer run DDL directly from the next time they open the project.
  • Restricted members cannot click the Execute DDL button in the DDL Preview and Execution window, and running a DDL statement in the SQL editor shows DDL execution is restricted. Please request the approver to apply it to the DB. and does not run it.
  • In the Approver Role field (3), pick the role that approves this role's requests. Only members of that role or a higher role approve ('Who requests and who approves' above). You can pick the owner and other roles that do not have DDL Restriction.
  • Changing the approver role and saving applies right away, also to requests that are already pending.

Requesting approval

A request covers the tables you changed, not an ERD. It is the same request whether you apply from a personal ERD, a team ERD, a table tab or the explorer.

  1. Open the DDL Preview and Execution window from where you usually apply changes, such as the Apply Changes to DB... button in the ERD info panel. Only tables you changed are listed.
  2. The Execute DDL button (1) cannot be clicked. Choose the tables to apply and click the Request DB Apply button (2).
  3. In the DDL Apply Request window, write a reason of up to 500 characters in the Reason field and click the Submit button. The request cannot be sent without a reason.
  4. The request appears in the Pending tab of the Project railDDL Approval panel.
  • When you apply from the Schema Changes panel, the DDL Preview & Execute window that follows the Change Review window has an Apply Reason field at the bottom. Write the reason and click the Request Approval or Request All Approvals button. One request is created per connection and database.
  • Withdraw a pending request with the Withdraw button in the Pending tab. A withdrawn request moves to the Completed tab.

Reviewing and approving

  1. Click a request row in the Pending tab of the Project railDDL Approval panel. The DDL Approval Review window opens.
  2. In the request details (1), check who wants to apply what to which database, and why.
  3. Read the DDL in the DDL Content field (2) and edit it if needed. It can be edited only when someone who can approve that request opens it while it is pending.
  4. Write a note for the requester in the Approval/Rejection Message field (3). It is optional.
  5. Click the Approve & Execute DDL button (6) and click Execute in the confirmation. Your app runs the DDL on the request's connection, and the request is recorded as approved only if the run succeeds.
  • If the run fails, the Approval Failed window shows the error and the request stays Pending. Fix the DDL and approve again, or reject it.
  • To not apply it, click the Reject button (5). The requester's changes remain, so they fix them and request again or revert the changes.
  • To run the DDL separately in the SQL editor, copy it with the Copy DDL button (4). Run that way, the request stays pending.

After processing

  • The requester gets an approval or rejection notification. Clicking it opens the request in the Completed tab of the Project railDDL Approval panel.
  • The DDL Approval Review window of a processed request shows Processed By, Processing Message and the Executed Query that was actually run.
  • After approval, the applied changes stop being marked as changes on the requester's screen. Anything they changed after sending the request remains a change. Their app re-reads the database when the notification arrives or when they reopen the project.
  • DDL run on approval is recorded in the approver's SQL history and saved SQL.
  • When a new request arrives, members who can approve it get a notification. The requester does not. Clicking it opens the request in the Pending tab of the Project railDDL Approval panel.
  • When you open a project that has pending requests you can approve, the DDL Approval Pending window appears. Requesters do not see this window for their own requests.

Things to keep in mind

  • The DDL is run by the approver's app. The desktop app connects to the database from the approver's computer, the web app from the NeoSQL server. The approver must be able to reach the database with that connection (Connections and execution targets).
  • Approving runs the DDL after a single confirmation. For a production database, read the DDL to the end before approving.
  • Edited DDL is split into statements the same way as in the SQL editor and run in order. When you add a statement, end the previous statement with ;.
  • DDL Restriction only blocks running DDL from NeoSQL screens. If the connection's database account has DDL privileges, other tools that connect with the same database account are not blocked. For a production database where DDL must be blocked, block it with the database account's privileges: create the connections that restricted members use with a database account that has no DDL privileges (Safeguards for production databases).
  • When you turn off a role's DDL Restriction item and save the settings, the unapplied changes of that role's members are discarded and their pending requests are cancelled. Process the requests you want to keep before turning it off.