From e7f6315882ef16939f99dd757eaf800b9f12e92b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 28 Mar 2013 16:04:48 +0200 Subject: Add changelog support for add/drop index/foreign key Also diagnose changes to primary keys and establish the 'alters' association. --- common/changelog/add-index.hxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 common/changelog/add-index.hxx (limited to 'common/changelog/add-index.hxx') diff --git a/common/changelog/add-index.hxx b/common/changelog/add-index.hxx new file mode 100644 index 0000000..92437ab --- /dev/null +++ b/common/changelog/add-index.hxx @@ -0,0 +1,25 @@ +// file : common/changelog/add-index.hxx +// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ADD_INDEX_HXX +#define ADD_INDEX_HXX + +#pragma db model version(BVER, CVER, true) + +#pragma db object +struct object +{ + #pragma db id auto + int id; + + int x; + +#if CVER > 1 + int y; + #pragma db index ("xy_i") unique member(x) member(y, "DESC") +#endif + +}; + +#endif // ADD_INDEX_HXX -- cgit v1.1