forked from diesel-rs/diesel
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request diesel-rs#3681 from DannyGoldberg/patch-1
fix(diesel_cli): use separate lines for multiple annotations
- Loading branch information
Showing
5 changed files
with
33 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
diesel_cli/tests/print_schema/print_schema_multiple_annotations/diesel.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[print_schema] | ||
file = "src/schema.rs" | ||
with_docs = false |
15 changes: 15 additions & 0 deletions
15
diesel_cli/tests/print_schema/print_schema_multiple_annotations/postgres/expected.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
source: diesel_cli/tests/print_schema.rs | ||
description: "Test: print_schema_multiple_annotations" | ||
--- | ||
// @generated automatically by Diesel CLI. | ||
|
||
diesel::table! { | ||
example (id) { | ||
id -> Int4, | ||
#[sql_name = "type"] | ||
#[max_length = 10] | ||
type_ -> Nullable<Varchar>, | ||
} | ||
} | ||
|
4 changes: 4 additions & 0 deletions
4
diesel_cli/tests/print_schema/print_schema_multiple_annotations/postgres/schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CREATE TABLE example ( | ||
id SERIAL PRIMARY KEY, | ||
"type" VARCHAR(10) | ||
); |