on main help sign in
.github/workflows/lint.yaml+3−3
since splitsnapshots
unifiedsplit
@@ -15,7 +15,7 @@ jobs:
15 runs-on: ubuntu-latest
15 runs-on: ubuntu-latest
16 steps:
16 steps:
17 - name: Checkout
17 - name: Checkout
18− uses: actions/checkout@v2
18+ uses: actions/checkout@v4
19 - name: Select Rust toolchain with Clippy
19 - name: Select Rust toolchain with Clippy
20 uses: actions-rs/toolchain@v1
20 uses: actions-rs/toolchain@v1
21 with:
21 with:
@@ -23,6 +23,6 @@ jobs:
23 components: clippy
23 components: clippy
24 override: true
24 override: true
25 - name: Use cache for Rust dependencies
25 - name: Use cache for Rust dependencies
26− uses: Swatinem/rust-cache@v1
26+ uses: Swatinem/rust-cache@v2
27 - name: Lint using Clippy
27 - name: Lint using Clippy
28− run: cargo clippy
28+ run: cargo clippy
src/migrations/add_column.rs+3−3
@@ -81,7 +81,7 @@ impl Action for AddColumn {
81 let temp_column_name = self.temp_column_name(ctx);
81 let temp_column_name = self.temp_column_name(ctx);
82
82
83 let mut definition_parts = vec![
83 let mut definition_parts = vec![
84− temp_column_name.to_string(),
84+ format!("\"{}\"", temp_column_name.to_string()),
85 self.column.data_type.to_string(),
85 self.column.data_type.to_string(),
86 ];
86 ];
87
87
@@ -111,7 +111,7 @@ impl Action for AddColumn {
111 .iter()
111 .iter()
112 .map(|column| {
112 .map(|column| {
113 format!(
113 format!(
114− "{alias} public.{table}.{real_name}%TYPE := NEW.{real_name};",
114+ "\"{alias}\" public.{table}.{real_name}%TYPE := NEW.{real_name};",
115 table = table.real_name,
115 table = table.real_name,
116 alias = column.name,
116 alias = column.name,
117 real_name = column.real_name,
117 real_name = column.real_name,
@@ -131,7 +131,7 @@ impl Action for AddColumn {
131 DECLARE
131 DECLARE
132 {declarations}
132 {declarations}
133 BEGIN
133 BEGIN
134− NEW.{temp_column_name} = {up};
134+ NEW."{temp_column_name}" = {up};
135 END;
135 END;
136 END IF;
136 END IF;
137 RETURN NEW;
137 RETURN NEW;