-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use pretty json in .butane files (#175)
- Loading branch information
Showing
7 changed files
with
201 additions
and
10 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
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 @@ | ||
|
32 changes: 31 additions & 1 deletion
32
examples/getting_started/.butane/migrations/current/Blog.table
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 |
---|---|---|
@@ -1 +1,31 @@ | ||
{"name":"Blog","columns":[{"name":"id","sqltype":{"KnownId":{"Ty":"BigInt"}},"nullable":false,"pk":true,"auto":true,"unique":false,"default":null},{"name":"name","sqltype":{"KnownId":{"Ty":"Text"}},"nullable":false,"pk":false,"auto":false,"unique":false,"default":null}]} | ||
{ | ||
"name": "Blog", | ||
"columns": [ | ||
{ | ||
"name": "id", | ||
"sqltype": { | ||
"KnownId": { | ||
"Ty": "BigInt" | ||
} | ||
}, | ||
"nullable": false, | ||
"pk": true, | ||
"auto": true, | ||
"unique": false, | ||
"default": null | ||
}, | ||
{ | ||
"name": "name", | ||
"sqltype": { | ||
"KnownId": { | ||
"Ty": "Text" | ||
} | ||
}, | ||
"nullable": false, | ||
"pk": false, | ||
"auto": false, | ||
"unique": false, | ||
"default": null | ||
} | ||
] | ||
} |
100 changes: 99 additions & 1 deletion
100
examples/getting_started/.butane/migrations/current/Post.table
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 |
---|---|---|
@@ -1 +1,99 @@ | ||
{"name":"Post","columns":[{"name":"id","sqltype":{"KnownId":{"Ty":"Int"}},"nullable":false,"pk":true,"auto":true,"unique":false,"default":null},{"name":"title","sqltype":{"KnownId":{"Ty":"Text"}},"nullable":false,"pk":false,"auto":false,"unique":false,"default":null},{"name":"body","sqltype":{"KnownId":{"Ty":"Text"}},"nullable":false,"pk":false,"auto":false,"unique":false,"default":null},{"name":"published","sqltype":{"KnownId":{"Ty":"Bool"}},"nullable":false,"pk":false,"auto":false,"unique":false,"default":null},{"name":"blog","sqltype":{"Deferred":"PK:Blog"},"nullable":false,"pk":false,"auto":false,"unique":false,"default":null,"reference":{"Deferred":{"Deferred":"PK:Blog"}}},{"name":"byline","sqltype":{"KnownId":{"Ty":"Text"}},"nullable":true,"pk":false,"auto":false,"unique":false,"default":null},{"name":"likes","sqltype":{"KnownId":{"Ty":"Int"}},"nullable":false,"pk":false,"auto":false,"unique":false,"default":null}]} | ||
{ | ||
"name": "Post", | ||
"columns": [ | ||
{ | ||
"name": "id", | ||
"sqltype": { | ||
"KnownId": { | ||
"Ty": "Int" | ||
} | ||
}, | ||
"nullable": false, | ||
"pk": true, | ||
"auto": true, | ||
"unique": false, | ||
"default": null | ||
}, | ||
{ | ||
"name": "title", | ||
"sqltype": { | ||
"KnownId": { | ||
"Ty": "Text" | ||
} | ||
}, | ||
"nullable": false, | ||
"pk": false, | ||
"auto": false, | ||
"unique": false, | ||
"default": null | ||
}, | ||
{ | ||
"name": "body", | ||
"sqltype": { | ||
"KnownId": { | ||
"Ty": "Text" | ||
} | ||
}, | ||
"nullable": false, | ||
"pk": false, | ||
"auto": false, | ||
"unique": false, | ||
"default": null | ||
}, | ||
{ | ||
"name": "published", | ||
"sqltype": { | ||
"KnownId": { | ||
"Ty": "Bool" | ||
} | ||
}, | ||
"nullable": false, | ||
"pk": false, | ||
"auto": false, | ||
"unique": false, | ||
"default": null | ||
}, | ||
{ | ||
"name": "blog", | ||
"sqltype": { | ||
"Deferred": "PK:Blog" | ||
}, | ||
"nullable": false, | ||
"pk": false, | ||
"auto": false, | ||
"unique": false, | ||
"default": null, | ||
"reference": { | ||
"Deferred": { | ||
"Deferred": "PK:Blog" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "byline", | ||
"sqltype": { | ||
"KnownId": { | ||
"Ty": "Text" | ||
} | ||
}, | ||
"nullable": true, | ||
"pk": false, | ||
"auto": false, | ||
"unique": false, | ||
"default": null | ||
}, | ||
{ | ||
"name": "likes", | ||
"sqltype": { | ||
"KnownId": { | ||
"Ty": "Int" | ||
} | ||
}, | ||
"nullable": false, | ||
"pk": false, | ||
"auto": false, | ||
"unique": false, | ||
"default": null | ||
} | ||
] | ||
} |
41 changes: 40 additions & 1 deletion
41
examples/getting_started/.butane/migrations/current/Post_tags_Many.table
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 |
---|---|---|
@@ -1 +1,40 @@ | ||
{"name":"Post_tags_Many","columns":[{"name":"owner","sqltype":{"KnownId":{"Ty":"Int"}},"nullable":false,"pk":false,"auto":false,"unique":false,"default":null,"reference":{"Literal":{"table_name":"Post","column_name":"id"}}},{"name":"has","sqltype":{"Deferred":"PK:Tag"},"nullable":false,"pk":false,"auto":false,"unique":false,"default":null,"reference":{"Deferred":{"Deferred":"PK:Tag"}}}]} | ||
{ | ||
"name": "Post_tags_Many", | ||
"columns": [ | ||
{ | ||
"name": "owner", | ||
"sqltype": { | ||
"KnownId": { | ||
"Ty": "Int" | ||
} | ||
}, | ||
"nullable": false, | ||
"pk": false, | ||
"auto": false, | ||
"unique": false, | ||
"default": null, | ||
"reference": { | ||
"Literal": { | ||
"table_name": "Post", | ||
"column_name": "id" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "has", | ||
"sqltype": { | ||
"Deferred": "PK:Tag" | ||
}, | ||
"nullable": false, | ||
"pk": false, | ||
"auto": false, | ||
"unique": false, | ||
"default": null, | ||
"reference": { | ||
"Deferred": { | ||
"Deferred": "PK:Tag" | ||
} | ||
} | ||
} | ||
] | ||
} |
19 changes: 18 additions & 1 deletion
19
examples/getting_started/.butane/migrations/current/Tag.table
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 |
---|---|---|
@@ -1 +1,18 @@ | ||
{"name":"Tag","columns":[{"name":"tag","sqltype":{"KnownId":{"Ty":"Text"}},"nullable":false,"pk":true,"auto":false,"unique":false,"default":null}]} | ||
{ | ||
"name": "Tag", | ||
"columns": [ | ||
{ | ||
"name": "tag", | ||
"sqltype": { | ||
"KnownId": { | ||
"Ty": "Text" | ||
} | ||
}, | ||
"nullable": false, | ||
"pk": true, | ||
"auto": false, | ||
"unique": false, | ||
"default": null | ||
} | ||
] | ||
} |