Giter Club home page Giter Club logo

pl-admin's Introduction

PL Admin

Cambiar a Español

PL-Admin is a PL/SQL Manager that provides you with an easy way to clone a main schema, compile pl/sql code on realtime, check for database errors, check for differences between repos and databases, and so much more.

This tool was created to deal with database-centered apps, with too much logic on the database side and very little on the code side.

Requirements

$ docker -v
  Docker version 19.03.5 # Or greater

docker-compose

version: "3.7"
services:
  pladmin-omega:
    image: viva/pl-admin
    container_name: pladmin-omega
    build:
      context: '.'
    volumes:
      - <you_plsql_path>:/plsql # <-- DO NOT FORGET SETUP YOUR PL/SQL PATH
    tty: true
    networks:
      - backend

Setup

  • Clone the repo
# Git
git clone <repo_url>
  • Creating images and container
# Build the docker image
docker build --no-cache -t viva/pl-admin .

# Create the container
# Do not forget replace <path_to_plsql_code> for your plsql path
docker run -ti --name=pladmin-omega -d -v <path/to/plsql_code>:/plsql viva/pl-admin

# In case that you have other schema just create another container with other name
docker run -ti --name=pladmin-reclamaciones -d -v <path/to/plsql_code>:/plsql viva/pl-admin
  • Copy .env.sample file to each pl/sql path and change the params
cp .env.sample you_plsql_path/.env

Create an alias the made the proccess more easier

# Open your profile config should be .bash_profile or .zshrc
vim ~/.bash_profile

# Enter this line:
alias pladmin="docker container exec -ti pladmin-omega pladmin"

# If you have multiple schemas, enter this line too:
alias pl-reclamaciones="docker container exec -ti pladmin-reclamaciones pladmin"

# Close the file and source you new alias
source ~/.bash_profile

Topics

Important for your PL/SQL path

  • The file name has to be the same of the object name.
  • Do not duplicate files names.
  • The file extension indicates what kind of object it is.
  • Each object type has to be in it's corresponding directory.
Object Type File Extention Directory
PACKAGE .pks ./packages
PACKAGE BODY .pkb ./packages
VIEW .vw ./views
FUNCTION .fnc ./functions
PROCEDURE .prc ./procedures

pl-admin's People

Contributors

adrianmendez1199 avatar ivanipalacios avatar krystian19 avatar samuel-maldonado avatar samuel005005 avatar wilo087 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pl-admin's Issues

Error creating new files that has been created before

If you get a new object from the database and change to another git branch when you execute wc2db command to get the new object again you receive and python exception:

Traceback (most recent call last):
  File "/usr/local/bin/pladmin", line 359, in <module>
    sys.exit(main())
  File "/usr/local/bin/pladmin", line 317, in main
    db2wc(dry_run, force)
  File "/usr/local/bin/pladmin", line 119, in db2wc
    wcMd5 = files.fileMD5(objectPath)
  File "/app/pladmin/files.py", line 302, in fileMD5
    with open(filePath) as opf:
FileNotFoundError: [Errno 2] No such file or directory: '/plsql/procedures/PROC_POLITICA_USO.prc'

Setup CI/CD with CircleCI

The idea is create a pipe line using CircleCI to deploy the docker image automatically on docker hub.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.