Skip to content

Commit dac45cb

Browse files
committed
added a test for type renaming
1 parent ad78813 commit dac45cb

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[print_schema]
2+
file = "src/schema.rs"
3+
with_docs = true
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
table! {
2+
/// Representation of the `users` table.
3+
///
4+
/// (Automatically generated by Diesel.)
5+
users (id) {
6+
/// The `id` column of the `users` table.
7+
///
8+
/// Its SQL type is `Int4`.
9+
///
10+
/// (Automatically generated by Diesel.)
11+
id -> Int4,
12+
/// The `job` column of the `users` table.
13+
///
14+
/// Its SQL type is `UserJob`.
15+
///
16+
/// (Automatically generated by Diesel.)
17+
job -> UserJob
18+
}
19+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CREATE TYPE user_job AS ENUM ('programmer', 'director', 'writer', 'mathematician');
2+
3+
CREATE TABLE users (
4+
id INTEGER PRIMARY KEY,
5+
job user_job NOT NULL
6+
);
7+

0 commit comments

Comments
 (0)