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

[indexer]: Create script to autogenerate indexer schema #5012

Merged
merged 6 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions crates/iota-indexer/src/schema.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
diff --git a/crates/iota-indexer/src/schema.rs b/crates/iota-indexer/src/schema.rs
--- a/crates/iota-indexer/src/schema.rs
+++ b/crates/iota-indexer/src/schema.rs
@@ -1 +1,4 @@
@@ -1,4 +1,7 @@
-// @generated automatically by Diesel CLI.
+// Copyright (c) Mysten Labs, Inc.
+// Modifications Copyright (c) 2024 IOTA Stiftung
+// SPDX-License-Identifier: Apache-2.0
// @generated automatically by Diesel CLI.
+// @generated automatically by scripts/indexer-schema/generate.sh

diesel::table! {
active_addresses (address) {
@@ -414,7 +417,10 @@ diesel::table! {
}
}

-diesel::allow_tables_to_appear_in_same_query!(
+#[macro_export]
+macro_rules! for_all_tables {
+ ($action:path) => {
+ $action!(
active_addresses,
address_metrics,
addresses,
@@ -451,5 +457,9 @@ diesel::allow_tables_to_appear_in_same_query!(
tx_input_objects,
tx_kinds,
tx_recipients,
- tx_senders,
-);
+ tx_senders
+ );
+ };
+}
+pub use for_all_tables;
+for_all_tables!(diesel::allow_tables_to_appear_in_same_query);
Loading
Loading