Content


NTL
Core
CDbMigrationKey

CDbMigrationKey


This class provides high level way to describe database table keys and indices. It is used in migrations.

You can find more information in comments below. Overrided methods can be found in corresponding base class or interface.

class CDbMigrationKey :public virtual IDbMigrationKey, public CReleasable
{
public:
    // IDbMigrationKey methods 
    IDbMigrationKey* Comment(const String& comment) override;

    CDbMigrationKey(const String& name, const StringArray& parts, const bool& fulltext); // [FULLTEXT] INDEX [name] (part,...) 
    CDbMigrationKey(const String& symbol, const StringArray& parts); // [CONSTRAINT [symbol]] PRIMARY KEY (part,...) 
    CDbMigrationKey(const String& symbol, const String& name, const StringArray& parts); // [CONSTRAINT [symbol]] UNIQUE [name] (part,...) 
    CDbMigrationKey(
        const String& symbol,
        const String& name,
        const StringArray& columns,
        const String& ref_table,
        const StringArray& ref_parts,
        const IDbMigrationKey::RefOption &on_delete,
        const IDbMigrationKey::RefOption& on_update); // [CONSTRAINT [symbol]] FOREIGN KEY [name] (column,...) reference_definition 
};
Namespace: nitisa
Include: Nitisa/Db/DbMigrationKey.h