Browse Source

updated event migration

added autoincrement id and filename
which is used for deleting events
main
Stefan Pranger 2 years ago
parent
commit
7cc6a792e0
  1. 4
      db/migrations/1624829187_create_events.h

4
db/migrations/1624829187_create_events.h

@ -8,11 +8,13 @@ namespace db {
public: public:
m1624829187_create_events() : Migration() { m1624829187_create_events() : Migration() {
db_builder::Table create_events = db_builder::Table::create("events" db_builder::Table create_events = db_builder::Table::create("events"
).text("uid", "NOT NULL"
).integer("id", "NOT NULL PRIMARY KEY"
).text("uid", "NOT NULL UNIQUE"
).text("summary", "NOT NULL" ).text("summary", "NOT NULL"
).integer("dtstart", "NOT NULL" ).integer("dtstart", "NOT NULL"
).integer("dtend", "NOT NULL" ).integer("dtend", "NOT NULL"
).text("location" ).text("location"
).text("filename", "NOT NULL"
).close(); ).close();
m_statement = create_events.str(); m_statement = create_events.str();
} }

Loading…
Cancel
Save