OS X compilation issues
[public/netxms.git] / sql / metadata.in
CommitLineData
28f5b9a4
VK
1/*
2** Metadata
3**
4** ex: syntax=sql
5*/
6
7INSERT INTO metadata (var_name,var_value)
8 VALUES ('SchemaVersion',DB_FORMAT_VERSION);
9INSERT INTO metadata (var_name,var_value)
10 VALUES ('Syntax',DB_SYNTAX);
11INSERT INTO metadata (var_name,var_value)
50da2d20 12 VALUES ('IDataTableCreationCommand','CREATE TABLE idata_%d (item_id integer not null,idata_timestamp integer not null,idata_value varchar(255) null)');
4161f620 13#if defined(DB_POSTGRESQL)
28f5b9a4 14INSERT INTO metadata (var_name,var_value)
4161f620 15 VALUES ('IDataIndexCreationCommand_0','CREATE INDEX idx_idata_%d_timestamp_id ON idata_%d(idata_timestamp,item_id)');
28f5b9a4
VK
16#elif defined(DB_MSSQL)
17INSERT INTO metadata (var_name,var_value)
4161f620
VK
18 VALUES ('IDataIndexCreationCommand_0','CREATE CLUSTERED INDEX idx_idata_%d_id_timestamp ON idata_%d(item_id,idata_timestamp)');
19#else
20INSERT INTO metadata (var_name,var_value)
21 VALUES ('IDataIndexCreationCommand_0','CREATE INDEX idx_idata_%d_id_timestamp ON idata_%d(item_id,idata_timestamp)');
28f5b9a4 22#endif