Studio
Studio is the optional DDL editor in the reeman app. It lets an authorized developer edit Reepolee-style SQLite and MySQL schema files in the browser, while preserving unrelated SQL statements and the project's SQL-first workflow.
Studio is installed as a separate module. After installation, start reeman and open /studio; users need the studio module tag. The Database page links directly to Studio for an eligible SQL file when the module is installed.
Editable Files
Studio deliberately edits only these allowlisted locations:
sql/sqlite/demos/sql/mysql/demos/marketplace/*/sqlite/marketplace/*/mysql/
It does not edit foundational schema files or arbitrary paths. Views are read-only in the editor. Edit a custom view in SQL, or regenerate a companion v_<table> view from its table.
Editing a Table
Select a SQL file and table in the Studio sidebar. Each column exposes its name, Reepolee domain type, SQL type, nullability, default, primary-key and uniqueness settings, generated expression, and optional table.column reference.
Studio uses the canonical domain-type configuration for the selected database dialect. It recognizes conventional names such as id, display, created_at, updated_at, is_*, *_image, *_file, and time-duration suffixes. Favorites and recent domain types are stored in the browser only.
Before saving, the page previews the generated DDL and highlights its line-level differences. You can undo unsaved preview states. Saving reloads the file, validates the submitted table, writes just the changed table definition, and then parses the written file again.
Table Actions
- New table creates the standard
id,name,display,created_at, andupdated_atcolumns, plus the normal drop statement, name index, and SQLite update trigger where applicable. - Copy table duplicates the table definition under a new snake-case name. It does not copy related data, indexes, triggers, or views.
- Delete table removes the table and its matching drop statement, indexes, triggers, inserts, and generated
v_<table>view. Use source control to recover an accidental deletion. - Generate view creates or replaces
v_<table>, including left joins and*_displayaliases for explicit and conventional foreign keys.
Adapt Schema
Adapt Schema produces a validated sibling *-adapted.sql copy rather than overwriting the source file. It brings tables toward Reepolee's standard shape: integer id, display, created_at, and updated_at; it also updates affected foreign-key references and companion views. Review the copy before adopting it.
Safety
Every mutation reloads the current source file and validates it on the server. Paths are checked against the allowlist, Studio module access and CSRF protection are required, and unedited statements remain byte-identical. Studio stores its domain mappings as SQL comments at the end of the file, so the resulting file remains directly executable by SQLite or MySQL.
After a schema change, apply the reviewed SQL through the normal reeman database flow, then regenerate or refresh the affected CRUD resources. See Schema & Initialization and Generators.