You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
993 B
25 lines
993 B
#pragma once
|
|
|
|
namespace db {
|
|
namespace migrations {
|
|
namespace db_builder = db::migrations::builder;
|
|
|
|
class m1624964657_create_alarms : public Migration {
|
|
public:
|
|
//TODO https://techsparx.com/software-development/sqlite3/mysql-style-enum.html
|
|
// action should be an enum
|
|
m1624964657_create_alarms() : Migration() {
|
|
db_builder::Table create_alarms = db_builder::Table::create("alarms"
|
|
).integer("id", "PRIMARY KEY"
|
|
).integer("eventID", "REFERENCES events(uid)"
|
|
).text("description"
|
|
).text("action"
|
|
).text("absolute_trigger"
|
|
).close();
|
|
|
|
|
|
m_statement = create_alarms.str();
|
|
}
|
|
};
|
|
}
|
|
}
|