Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy_schema.py script does not get installed #75

Open
kjsanger opened this issue Oct 8, 2024 · 5 comments
Open

deploy_schema.py script does not get installed #75

kjsanger opened this issue Oct 8, 2024 · 5 comments

Comments

@kjsanger
Copy link
Member

kjsanger commented Oct 8, 2024

Porch version: 2.0.0

The deploy_schema.py script does not get installed. After cloning the repo, run

python -m venv /app
. /app/bin/activate

cd ./npg_porch
pip install .

deploy_schema.py should now be on the PATH

@mgcam
Copy link
Member

mgcam commented Oct 8, 2024

Historically the database deployment scripts were never deployed for any of NPG repositories. Only the code needed is production scenarios is deployed

@kjsanger
Copy link
Member Author

kjsanger commented Oct 8, 2024

I agree, which means that in other scenarios, e.g. for testing, it's not available where it's needed. So I'm suggesting that be changed in order to make setting up a server easier

@mgcam
Copy link
Member

mgcam commented Oct 8, 2024

Let's think what we can do

@kjsanger
Copy link
Member Author

kjsanger commented Oct 8, 2024

Perhaps it could be included in the console scripts section of pyproject.toml. The scripts would end up on the server, so I expect it wouldn't be confused with production scripts used for other purposes.

If it's not used in production deployment, how do the tables get created for that case?

@mgcam
Copy link
Member

mgcam commented Oct 8, 2024

There might have been an SQL script to create the original schema. Since the app went into production porch schema did not change, so this part of the application is underdeveloped. We use Alembic for LangQC, which is good. However, this creates dependency on Alembic libraries, which we only install in devel mode. So in my devel setup I was able to run Alembic migrations for both prod and dev MySQL database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants