Skip to content

Commit

Permalink
Merge pull request #4183 from guissalustiano/multirange_diesel_cli
Browse files Browse the repository at this point in the history
add multirange to diesel_cli
  • Loading branch information
weiznich authored Aug 21, 2024
2 parents 1ad03dd + d14e5b9 commit ae82c4a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
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
);


0 comments on commit ae82c4a

Please sign in to comment.