add sql dump

This commit is contained in:
Bartosz Wieczorek 2018-01-30 11:01:31 +01:00
parent 51e39e5498
commit 3c5b5d3be3
4 changed files with 2184 additions and 3 deletions

2177
sql/dump.sql Normal file

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,6 @@ file(GLOB SOURCE
auth/Services.cpp
data/*
widgets/*
model/*
)
include_directories( ${PostgreSQL_INCLUDE_DIRS} )

View File

@ -8,5 +8,9 @@ set(SOURCE
config.cpp
)
add_library(eedb_db ${SOURCE})
file(GLOB MODEL
model/*
)
add_library(eedb_db ${SOURCE} ${MODEL})
target_link_libraries( eedb_db wt sqlpp-postgresql )

View File

@ -22,6 +22,7 @@
#pragma GCC diagnostic pop
#include <nlohmann/json.hpp>
#include <spdlog/spdlog.h>
#include <sqlpp11/sqlpp11.h>
using User = eedb::db::details::User;
@ -307,7 +308,7 @@ int PgUserAuth::emailTokenRole(const User & user) const {
if(ret.empty())
throw std::exception();
auto val = ret.front().email_token_role;
return val.value();
return static_cast< int >(val.value());
}
void PgUserAuth::addAuthToken(const User & user, details::Token token) {