-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use migration system for JobQueue and Persist frameworks #8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just worried about namespace clashing
|
||
extension HBMigrationGroup { | ||
/// JobQueue migration group | ||
public static var jobQueue: Self { .init("_hb_jobqueue") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this better off as such:
public static var jobQueue: Self { .init("_hb_jobqueue") } | |
public static var jobQueue: Self { .init("_hb_pg_jobqueue") } |
@@ -180,7 +166,7 @@ public final class HBPostgresQueue: HBJobQueueDriver { | |||
} | |||
// select job from job table | |||
let stream2 = try await connection.query( | |||
"SELECT job FROM \(unescaped: self.configuration.jobTable) WHERE id = \(jobId)", | |||
"SELECT job FROM _hb_jobs WHERE id = \(jobId)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tables should probably be namespaced to pg right?
|
||
extension HBMigrationGroup { | ||
/// Persist driver migration group | ||
public static var persist: Self { .init("_hb_persist") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise
public static var persist: Self { .init("_hb_persist") } | |
public static var persist: Self { .init("_hb_pg_persist") } |
Also
HBMigrations.revert()
no longer sets the migrations to be complete.