Skip to content

Commit 2bfa64f

Browse files
weiznichJohnTitor
authored andcommitted
Use macros via full path when generating a schema.rs file
1 parent 4e0b9a3 commit 2bfa64f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

diesel_cli/src/print_schema.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ impl<'a> Display for TableDefinitions<'a> {
158158
}
159159

160160
if self.tables.len() > 1 {
161-
write!(f, "\nallow_tables_to_appear_in_same_query!(")?;
161+
write!(f, "\ndiesel::allow_tables_to_appear_in_same_query!(")?;
162162
{
163163
let mut out = PadAdapter::new(f);
164164
writeln!(out)?;
@@ -185,7 +185,7 @@ struct TableDefinition<'a> {
185185

186186
impl<'a> Display for TableDefinition<'a> {
187187
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
188-
write!(f, "table! {{")?;
188+
write!(f, "diesel::table! {{")?;
189189
{
190190
let mut out = PadAdapter::new(f);
191191
writeln!(out)?;
@@ -273,7 +273,7 @@ impl<'a> Display for Joinable<'a> {
273273

274274
write!(
275275
f,
276-
"joinable!({} -> {} ({}));",
276+
"diesel::joinable!({} -> {} ({}));",
277277
child_table_name, parent_table_name, self.0.foreign_key_rust_name,
278278
)
279279
}

0 commit comments

Comments
 (0)