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

Fixed missing JDBC driver dependency + .gitignore #23

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ZanyLeonic
Copy link

The fixes in this PR contain:

  • Postgresql JDBC driver being defined as a Gradle dependency rather than a specific version of a JAR file
  • Added a few more entries to the .gitignore to stop Git versioning Gradle and Java class/build files
  • Removed a dependency on an non-existent key from tables.sql

The settings files just are there because of my development setup, feel free to remove them if necessary.

@@ -13,7 +13,7 @@ create table job_schedule

create table student_verification
(
student_pk integer default nextval('student_id_student_pk_seq'::regclass) not null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a hack to get the tables made without errors. I am assuming that the constraint is important.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I am sure of it, but it doesn't seem to work whenever I try to parse it into Postgresql

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's internally how serial is represented; but serial also creates the sequence. They should probably be switched over to serial to make it easier to use.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated it to serial type in the latest commit.


# End of https://www.toptal.com/developers/gitignore/api/java,gradle

# User database + Discord stuff
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The database.json is a config file containing the connection info to the database - it isn't used as a database.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, isn't this file meant to be relative to what you are deploying it to?
Since, the URL to the server and username might be different.

I can commit mine if you want, I just didn't include mine since the repo didn't include one to begin with.

Copy link
Collaborator

@hexillium1 hexillium1 Oct 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filename and comment are just a bit misleading I thought for a second the database had become flatfile.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah fair enough, I just followed the code to see what the bot was looking for in terms of connecting to the PostGresql database.

arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(LOCAL_INSTALLATION(/home/kurisu/.sdkman/candidates/gradle/current))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this file for, should it be committed, and is this supposed to have your home directory in here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, this was a hidden file that didn't show up on my IDE, apologies.

build.gradle Outdated
@@ -46,4 +38,6 @@ dependencies {
implementation group: 'io.github.classgraph', name: 'classgraph', version: '4.8.114'
implementation 'com.zaxxer:HikariCP:5.0.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.4'
implementation 'org.postgresql:postgresql:42.2.0'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what to do about this, as it made the final JAR a lot bigger.

This should also be updated, or at the least not downgraded.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to the latest version of Postgresql, as listed here.

@ZanyLeonic ZanyLeonic requested a review from hexillium1 October 20, 2021 18:27
Copy link
Collaborator

@hexillium1 hexillium1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, but I request you add /.idea/ back into the gitignore

@ZanyLeonic
Copy link
Author

.idea/** was added back to the .gitignore.

@ZanyLeonic ZanyLeonic requested a review from hexillium1 October 20, 2021 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants