mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
чиним билд15
This commit is contained in:
@@ -6,10 +6,16 @@ import os
|
||||
|
||||
SQLALCHEMY_DATABASE_URL = os.getenv(
|
||||
"DATABASE_URL",
|
||||
"postgresql://postgres:postgres@postgres/support_db"
|
||||
"postgresql://postgres:postgres123@postgres:5432/support_db"
|
||||
)
|
||||
|
||||
engine = create_engine(
|
||||
SQLALCHEMY_DATABASE_URL,
|
||||
pool_pre_ping=True,
|
||||
pool_size=5,
|
||||
max_overflow=10
|
||||
)
|
||||
|
||||
engine = create_engine(SQLALCHEMY_DATABASE_URL)
|
||||
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
||||
|
||||
Base = declarative_base()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
-- Create the postgres superuser
|
||||
CREATE USER postgres WITH PASSWORD 'postgres' SUPERUSER;
|
||||
|
||||
-- Create the database
|
||||
-- Create database
|
||||
CREATE DATABASE support_db;
|
||||
|
||||
-- Grant privileges
|
||||
GRANT ALL PRIVILEGES ON DATABASE support_db TO postgres;
|
||||
-- Connect to the database
|
||||
\c support_db;
|
||||
|
||||
-- Create extensions if needed
|
||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
||||
Reference in New Issue
Block a user