From 145bfa02a923722a12035c26a6195bc60580b351 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 8 Apr 2024 19:00:38 +0800 Subject: [PATCH] Fix graphql example --- .../migration/src/m20220101_000001_create_table.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/graphql_example/migration/src/m20220101_000001_create_table.rs b/examples/graphql_example/migration/src/m20220101_000001_create_table.rs index c42a347b..36e574b6 100644 --- a/examples/graphql_example/migration/src/m20220101_000001_create_table.rs +++ b/examples/graphql_example/migration/src/m20220101_000001_create_table.rs @@ -9,11 +9,11 @@ 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 @@ -21,13 +21,13 @@ impl MigrationTrait for Migration { 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,