gamegos / cesi

CeSI is a web interface for managing multiple supervisors from the same place.
GNU General Public License v3.0
571 stars 184 forks source link

Support for oracle #93

Open AI-Ying opened 3 years ago

AI-Ying commented 3 years ago
  1. defaults/cesi.conf.toml
database = "oracle://scott:tiger@127.0.0.1:1521/?service_name=orcl"
#database = "sqlite:////opt/cesi/< version >/users.db"  # Absolute path
#database = "postgres://<user>:<password>@localhost:5432/<database_name>"
#database = "mysql+pymysql://<user>:<password>@localhost:3306/<database_name>"
  1. cesi/models.py

    class User(db.Model):
    __tablename__ = "users"
    id = db.Column(db.Integer, db.Sequence("id_sequence", increment=1), primary_key=True)
  2. cx_oracle

    pip install cx_oracle
  3. Download oracle instantclient

    cd ${CESI_SETUP_PATH}
    wget https://download.oracle.com/otn_software/linux/instantclient/185000/instantclient-basic-linux.x64-18.5.0.0.0dbru.zip
    unzip instantclient-basic-linux.x64-18.5.0.0.0dbru.zip
    export LD_LIBRARY_PATH="/opt/cesi/instantclient_18_5"