Skip to content

Commit

Permalink
Fix graphql example
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Apr 8, 2024
1 parent 8c73954 commit 145bfa0
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ impl MigrationTrait for Migration {
manager
.create_table(
Table::create()
.table(Posts::Table)
.table(Notes::Table)
.if_not_exists()
.col(pk_auto(Posts::Id))
.col(string(Posts::Title))
.col(string(Posts::Text))
.col(pk_auto(Notes::Id))
.col(string(Notes::Title))
.col(string(Notes::Text))
.to_owned(),
)
.await
}

async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
manager
.drop_table(Table::drop().table(Posts::Table).to_owned())
.drop_table(Table::drop().table(Notes::Table).to_owned())
.await
}
}

#[derive(DeriveIden)]
enum Posts {
enum Notes {
Table,
Id,
Title,
Expand Down

0 comments on commit 145bfa0

Please sign in to comment.