From 428898b3ca46855822c80c9bd8a9ae9c8da5aaf2 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 15 May 2018 11:06:08 -0700 Subject: regenerate full(er) database schema --- rust/src/database_schema.rs | 191 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) (limited to 'rust') diff --git a/rust/src/database_schema.rs b/rust/src/database_schema.rs index 7bef7dcd..83e7f7d0 100644 --- a/rust/src/database_schema.rs +++ b/rust/src/database_schema.rs @@ -6,6 +6,37 @@ table! { } } +table! { + container_edit (id) { + id -> Int8, + extra_json -> Nullable, + ident_id -> Uuid, + rev_id -> Nullable, + redirect_id -> Nullable, + editgroup_id -> Int8, + } +} + +table! { + container_ident (id) { + id -> Uuid, + is_live -> Bool, + rev_id -> Nullable, + redirect_id -> Nullable, + } +} + +table! { + container_rev (id) { + id -> Int8, + extra_json -> Nullable, + name -> Nullable, + parent_ident_id -> Nullable, + publisher -> Nullable, + issn -> Nullable, + } +} + table! { creator_edit (id) { id -> Int8, @@ -53,16 +84,176 @@ table! { } } +table! { + file_edit (id) { + id -> Int8, + extra_json -> Nullable, + ident_id -> Uuid, + rev_id -> Nullable, + redirect_id -> Nullable, + editgroup_id -> Int8, + } +} + +table! { + file_ident (id) { + id -> Uuid, + is_live -> Bool, + rev_id -> Nullable, + redirect_id -> Nullable, + } +} + +table! { + file_release (id) { + id -> Int8, + file_rev -> Int8, + target_release_ident_id -> Uuid, + } +} + +table! { + file_rev (id) { + id -> Int8, + extra_json -> Nullable, + size -> Nullable, + sha1 -> Nullable, + url -> Nullable, + } +} + +table! { + release_contrib (id) { + id -> Int8, + release_rev -> Int8, + creator_ident_id -> Nullable, + stub -> Nullable, + contrib_type -> Nullable, + } +} + +table! { + release_edit (id) { + id -> Int8, + extra_json -> Nullable, + ident_id -> Uuid, + rev_id -> Nullable, + redirect_id -> Nullable, + editgroup_id -> Int8, + } +} + +table! { + release_ident (id) { + id -> Uuid, + is_live -> Bool, + rev_id -> Nullable, + redirect_id -> Nullable, + } +} + +table! { + release_ref (id) { + id -> Int8, + release_rev -> Int8, + target_release_ident_id -> Nullable, + index -> Nullable, + stub -> Nullable, + } +} + +table! { + release_rev (id) { + id -> Int8, + extra_json -> Nullable, + work_ident_id -> Nullable, + container_ident_id -> Nullable, + title -> Nullable, + license -> Nullable, + release_type -> Nullable, + date -> Nullable, + doi -> Nullable, + volume -> Nullable, + pages -> Nullable, + issue -> Nullable, + } +} + +table! { + work_edit (id) { + id -> Int8, + extra_json -> Nullable, + ident_id -> Uuid, + rev_id -> Nullable, + redirect_id -> Nullable, + editgroup_id -> Int8, + } +} + +table! { + work_ident (id) { + id -> Uuid, + is_live -> Bool, + rev_id -> Nullable, + redirect_id -> Nullable, + } +} + +table! { + work_rev (id) { + id -> Int8, + extra_json -> Nullable, + work_type -> Nullable, + primary_release_id -> Nullable, + } +} + joinable!(changelog -> editgroup (editgroup_id)); +joinable!(container_edit -> container_rev (rev_id)); +joinable!(container_edit -> editgroup (editgroup_id)); +joinable!(container_ident -> container_rev (rev_id)); joinable!(creator_edit -> creator_rev (rev_id)); joinable!(creator_edit -> editgroup (editgroup_id)); joinable!(creator_ident -> creator_rev (rev_id)); +joinable!(file_edit -> editgroup (editgroup_id)); +joinable!(file_edit -> file_rev (rev_id)); +joinable!(file_ident -> file_rev (rev_id)); +joinable!(file_release -> creator_ident (target_release_ident_id)); +joinable!(file_release -> file_rev (file_rev)); +joinable!(release_contrib -> creator_ident (creator_ident_id)); +joinable!(release_contrib -> release_rev (release_rev)); +joinable!(release_edit -> editgroup (editgroup_id)); +joinable!(release_edit -> release_rev (rev_id)); +joinable!(release_ident -> release_rev (rev_id)); +joinable!(release_ref -> creator_ident (target_release_ident_id)); +joinable!(release_ref -> release_rev (release_rev)); +joinable!(release_rev -> container_ident (container_ident_id)); +joinable!(release_rev -> work_ident (work_ident_id)); +joinable!(work_edit -> editgroup (editgroup_id)); +joinable!(work_edit -> work_rev (rev_id)); +joinable!(work_ident -> work_rev (rev_id)); +joinable!(work_rev -> release_ident (primary_release_id)); allow_tables_to_appear_in_same_query!( changelog, + container_edit, + container_ident, + container_rev, creator_edit, creator_ident, creator_rev, editgroup, editor, + file_edit, + file_ident, + file_release, + file_rev, + release_contrib, + release_edit, + release_ident, + release_ref, + release_rev, + work_edit, + work_ident, + work_rev, ); -- cgit v1.2.3