Jump to content

ICT:Adding a New Entity/Table

From Costa Sano MediaWiki
Revision as of 13:25, 29 January 2026 by Mngr (talk | contribs) (Created page with "= How to Add a New Entity/Table = == Purpose == Step-by-step guide for adding new data entities to the system. Follow this order strictly. Do not skip steps. ---- == Step 1 – Update DBML == Add the table definition to the DBML model first. DBML is the source of truth. ---- == Step 2 – Create template == Create: Template:EntityName Add: <pre> {{#cargo_store: _table=EntityNames |field1={{{field1|}}} |field2={{{field2|}}} }} </pre> Save. ---- == Step...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How to Add a New Entity/Table

Purpose

Step-by-step guide for adding new data entities to the system.

Follow this order strictly.

Do not skip steps.


Step 1 – Update DBML

Add the table definition to the DBML model first.

DBML is the source of truth.


Step 2 – Create template

Create:

Template:EntityName

Add:

{{#cargo_store:
 _table=EntityNames
 |field1={{{field1|}}}
 |field2={{{field2|}}}
}}

Save.


Step 3 – Create Cargo table

Go to:

Special:CargoTables

Click:

Recreate data

Verify table exists.


Step 4 – Create form

Go to:

Special:CreateForm

Add:

  • template
  • fields
  • target namespace
  • page name formula
  • hide title

Step 5 – Test manually

Create one page.

Verify:

  • page in correct namespace
  • data stored
  • queries work

Only then proceed.


Step 6 – Add queries or lists

After structure works:

  • Cargo queries
  • lists
  • reports

Never design UI before schema works.


Checklist

Before marking complete:

[ ] template exists [ ] cargo table created [ ] form works [ ] namespace enforced [ ] page name automatic [ ] test page saved [ ] query returns data

If any box unchecked → fix first.


Rule

Small working increments beat big automatic generation.