Skip to content

Commit

Permalink
Add migration to create job queue.
Browse files Browse the repository at this point in the history
  • Loading branch information
ISibboI committed Aug 8, 2023
1 parent 862b44e commit ba218f4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE job_queue;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CREATE TABLE job_queue (
scheduled_execution_time TIMESTAMP PRIMARY KEY,
name TEXT NOT NULL
);
27 changes: 26 additions & 1 deletion backend/rvoc-backend/src/schema.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
// @generated automatically by Diesel CLI.

diesel::table! {
/// Representation of the `job_queue` table.
///
/// (Automatically generated by Diesel.)
job_queue (scheduled_execution_time) {
/// The `scheduled_execution_time` column of the `job_queue` table.
///
/// Its SQL type is `Timestamp`.
///
/// (Automatically generated by Diesel.)
scheduled_execution_time -> Timestamp,
/// The `name` column of the `job_queue` table.
///
/// Its SQL type is `Text`.
///
/// (Automatically generated by Diesel.)
name -> Text,
}
}

diesel::table! {
/// Representation of the `languages` table.
///
Expand Down Expand Up @@ -69,4 +89,9 @@ diesel::table! {
diesel::joinable!(words -> languages (language));

Check warning on line 89 in backend/rvoc-backend/src/schema.rs

View workflow job for this annotation

GitHub Actions / Rust format

Diff in /home/runner/work/vocabulary-learning-application/vocabulary-learning-application/backend/rvoc-backend/src/schema.rs
diesel::joinable!(words -> word_types (word_type));

diesel::allow_tables_to_appear_in_same_query!(languages, word_types, words,);
diesel::allow_tables_to_appear_in_same_query!(
job_queue,
languages,
word_types,
words,
);

0 comments on commit ba218f4

Please sign in to comment.