Updated endpoints and tests for users, rbac, health, file, and auth
This commit is contained in:
1 parent
207b8eea5e
commit
d379fbd621
26 files changed
+582
-28
No files matched your search
@@ -0,0 +1,16 @@
|
||||
from sqlalchemy.orm import DeclarativeBase
|
||||
from sqlalchemy import engine
|
||||
|
||||
|
||||
class Base(DeclarativeBase):
|
||||
pass
|
||||
|
||||
|
||||
from sqlalchemy import event
|
||||
|
||||
@event.listens_for(engine.sync_engine, "connect")
|
||||
def _enable_sqlite_fk(dbapi_connection, connection_record):
|
||||
if settings.DATABASE_URL.startswith("sqlite"):
|
||||
cursor = dbapi_connection.cursor()
|
||||
cursor.execute("PRAGMA foreign_keys=ON")
|
||||
cursor.close()
|
||||
Reference in new issue
Block a user