Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add multirange to diesel_cli #4183

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions diesel_cli/src/print_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ fn pg_diesel_types() -> HashSet<&'static str> {
types.insert("Numrange");
types.insert("Tsrange");
types.insert("Tstzrange");
types.insert("Int4multirange");
types.insert("Int8multirange");
types.insert("Datemultirange");
types.insert("Nummultirange");
types.insert("Tsmultirange");
types.insert("Tstzmultirange");
types.insert("SmallSerial");
types.insert("BigSerial");
types.insert("Serial");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


table! {
all_the_types(id) {
id -> Integer,
Expand Down Expand Up @@ -39,6 +37,11 @@ table! {
daterange_col -> Daterange,
tsrange_col -> Tsrange,
tstzrange_col -> Tstzrange,
int4multirange_col -> Int4multirange,
int8multirange_col -> Int8multirange,
datemultirange_col -> Datemultirange,
tsmultirange_col -> Tsmultirange,
tstzmultirange_col -> Tstzmultirange,
small_serial_col -> SmallSerial,
big_serial_col -> BigSerial,
serial_col -> Serial,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ diesel::table! {
daterange_col -> Daterange,
tsrange_col -> Tsrange,
tstzrange_col -> Tstzrange,
int4multirange_col -> Int4multirange,
int8multirange_col -> Int8multirange,
datemultirange_col -> Datemultirange,
tsmultirange_col -> Tsmultirange,
tstzmultirange_col -> Tstzmultirange,
small_serial_col -> Int2,
big_serial_col -> Int8,
serial_col -> Int4,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
source: diesel_cli/tests/migration_generate.rs
assertion_line: 333
description: "Test: diff_add_table_all_the_types"
---
-- Your SQL goes here
Expand Down Expand Up @@ -42,11 +41,14 @@ CREATE TABLE "all_the_types"(
"daterange_col" DATERANGE NOT NULL,
"tsrange_col" TSRANGE NOT NULL,
"tstzrange_col" TSTZRANGE NOT NULL,
"int4multirange_col" INT4MULTIRANGE NOT NULL,
"int8multirange_col" INT8MULTIRANGE NOT NULL,
"datemultirange_col" DATEMULTIRANGE NOT NULL,
"tsmultirange_col" TSMULTIRANGE NOT NULL,
"tstzmultirange_col" TSTZMULTIRANGE NOT NULL,
"small_serial_col" SMALLSERIAL NOT NULL,
"big_serial_col" BIGSERIAL NOT NULL,
"serial_col" SERIAL NOT NULL,
"bytea_col" BYTEA NOT NULL,
"macaddr2_col" MACADDR NOT NULL
);


Loading