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

  1. #pragma once
  2. namespace db {
  3. namespace migrations {
  4. namespace db_builder = db::migrations::builder;
  5. class m1624964657_create_alarms : public Migration {
  6. public:
  7. //TODO https://techsparx.com/software-development/sqlite3/mysql-style-enum.html
  8. // action should be an enum
  9. m1624964657_create_alarms() : Migration() {
  10. db_builder::Table create_alarms = db_builder::Table::create("alarms"
  11. ).integer("id", "PRIMARY KEY"
  12. ).integer("eventID", "REFERENCES events(uid)"
  13. ).text("description"
  14. ).text("action"
  15. ).text("absolute_trigger"
  16. ).close();
  17. m_statement = create_alarms.str();
  18. }
  19. };
  20. }
  21. }