Closed nleroy917 closed 1 year ago
1) Issue: Why does it have create table, if we are connecting to database, which already should have this table?
2) hmm, I don't know why does it happend like that. in the initial sql file we are creating this db using this lines:id BIGSERIAL NOT NULL PRIMARY KEY,
. If it's primary key it should create key
- Issue: Why does it have create table, if we are connecting to database, which already should have this table?
If someone starts a fresh postgres instance, then they don't have to worry about table creation (pulling a docker image, or spinning one up on AWS). All the user has to worry about is deploying an instance and pepdb
handles the schema. @nsheff can weigh in here, if that's within the scope of this package.
2. hmm, I don't know why does it happend like that. in the initial sql file we are creating this db using this lines:
id BIGSERIAL NOT NULL PRIMARY KEY,
. If it's primary key it should create key
I'll wait for this to be more polished then come back to the digest + id
Ok. I see now with the pep_db
folder that has the docker image + schema file. That makes sense... then we might not need to address the issue with point 1 I made.
I have added to top-level README this information. I think this issue can be closed
Just had a couple of issues uploading projects to a database. I thought I would distill it all here:
I wrote an upload script to upload a folder of PEP's into a database. I just pulled the official postgres docker image and started running it like so:
Then I run the upload script with:
It seems to sort of work with two problems I've run into:
The
PEPAgent
doesn't create the table if it doesn't already exist. I had to go into pgadmin and manually create the schema. It'd be cool if PEPAgent could recognize this and just create it for you with the correct data types, names, etc.relation "projects" does not exist LINE 1: INSERT INTO projects(project_name, project_value, description...
The digests are all the same, and the id column is
null
. This might be an artifact from me creating the table manually with incorrect data types, but I wasn't sure.I'm less experienced in db-administration/connection tools, so maybe this isn't a good idea. @nsheff ?