#1 2018-07-06 07:00:49

mapes
Member
Registered: 2016-10-30
Posts: 16

CreateMissingTables question

Hi,

I'm using TSQLRestServerDb with Postgresql

  fServer := TSQLRestServerDB.Create(fModel);
  fServer.CreateMissingTables(0,INITIALIZETABLE_NOINDEX);

Is there a way to know, what tables were actually created on remote DB with CreateMissingTables ?

Even If I use INITIALIZETABLE_NOINDEX, table on remote DB is always created with Primary ID index. Is this expected behavior?

Offline

#2 2018-07-06 07:27:27

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

Re: CreateMissingTables question

if you add logging to your project:

TSynLog.Family.Level := LOG_VERBOSE;

The logs will show the SQL created by CreateMissingTables.

Offline

#3 2018-07-06 07:36:40

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: CreateMissingTables question

Yes, the primary key index is always created, since the ID/RowID field is very often used by the ORM.

Offline

Board footer

Powered by FluxBB