diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 106fa2a4..8ad7f0ec 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -32,7 +32,7 @@ jobs: working-directory: ${{github.workspace}}/build env: CTEST_OUTPUT_ON_FAILURE: 1 - run: ctest -C ${{ matrix.configuration }} -j `nproc` -V + run: ctest -C Debug -j `nproc` -V - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 \ No newline at end of file diff --git a/include/postgresql.hpp b/include/postgresql.hpp index 2e25513d..832f01d1 100644 --- a/include/postgresql.hpp +++ b/include/postgresql.hpp @@ -333,9 +333,14 @@ class postgresql { } else if constexpr (std::is_same_v) { if (!has_add_field) { - append(sql, field_name.data(), " "); + if (type_name_arr[i] == "bigint") { + append(sql, field_name.data(), " ", "bigserial"); + } + else { + append(sql, field_name.data(), " ", "serial"); + } } - append(sql, " serial primary key"); + append(sql, " primary key"); has_add_field = true; } else if constexpr (std::is_same_v) {