Blog Options
Archive
<< October 2025 >>-
Wednesday 15
- Using AI Services securely in TMS AI Studio -
Tuesday 14
- Our components are ready for Windows 11 -
Thursday 9
- Seamlessly combining the power of TWebDataGrid with StellarDS.io backend -
Wednesday 8
- Automatic Token Renewal with FetchAccessToken in TMS FNC Cloud Pack -
Tuesday 7
- Next Generation Data Grid for Delphi: Paging (BETA) -
Thursday 2
- Celebrating 10 Years of TMS ALL-ACCESS
- Introducing Attributes Support for MCP Servers in Delphi
Authors
- Bernard Roussely (3)
- Wagner Landgraf (93)
- Dennis Röhner (1)
- Roman Yankovsky (2)
- Bart Holvoet (41)
- Aaron Decramer (57)
- Pieter Scheldeman (125)
- Nancy Lescouhier (32)
- Adrian Gallero (34)
- Bruno Fierens (445)
- Marcos Douglas B. Santos (5)
- Bernard (4)
- Bradley Velghe (34)
- Andrew Simard (86)
- Holger Flick (15)
- Gjalt Vanhouwaert (42)
- Tunde Keller (31)
- Masiha Zemarai (117)
Blog
All Blog Posts | Next Post | Previous Post
My Top 10 Aurelius Features - #7 Schema Update
Tuesday, January 3, 2017
When creating a database-based application, one of the tasks I always considered boring was to create the database structure, table, fields, foreign keys. Even using a tool to generate a SQL would require me to create a table, add columns, column types, foreign keys, etc.That's why I consider the ability to automatically create and update the database schema to be the #7 feature of My Top 10 Aurelius Features. It's simply something I don't need to care about anymore.
Updating the database is as easy as doing this:
TDatabaseManager.Update(Connection);
Note that I'm talking about updating, not creating the database. That makes application prototyping and development really fast. Create the database, change your application, add a new table, update the database, and it goes on.
Even though updating the database is as simple as using one line of code, Aurelius provides advanced features for the database update process, like validation. With a code like the following, you can check the differences between the schema of the existing database, and what is needed in the schema to hold the current entity model you have. It shows you the differences without requiring you to actually execute the SQL statements:
procedure TForm1.ValidateMyDatabaseSchema; var DBManager: TDatabaseManager; Action: TSchemaAction; Warning: TSchemaWarning; Error: TSchemaError; begin DBManager := TDatabaseManager.Create(Connection); try DBManager.ValidateDatabase; { Show SQL statements } mmStatements.Clear; for Statement in DBManager.SQLStatements do begin mmStatements.Lines.Add(Statement); mmStatements.Lines.Add(''); end; { Show validation results } mmValidation.Clear; mmValidation.Lines.Add('----- Actions -----'); for Action in DBManager.Actions do mmValidation.Lines.Add(Format('%s -> %s', [Action.ClassName, Action.Text])); mmValidation.Lines.Add(''); mmValidation.Lines.Add('----- Warnings -----'); for Warning in DBManager.Warnings do mmValidation.Lines.Add(Format('%s: %s', [Warning.ClassName, Warning.Text])); mmValidation.Lines.Add(''); mmValidation.Lines.Add('----- Errors -----'); for Error in DBManager.Errors do mmValidation.Lines.Add(Format('%s: %s', [Error.ClassName, Error.Text])); finally DBManager.Free; end; end;
Wagner Landgraf

This blog post has received 2 comments.


Wagner R. Landgraf
All Blog Posts | Next Post | Previous Post
This is an absolutely great series, exactly what is needed to get started productively with Aurelius! Thank you!
Neal Campbell