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

foreign_keys not work. #18

Open
kekxv opened this issue Nov 9, 2022 · 1 comment
Open

foreign_keys not work. #18

kekxv opened this issue Nov 9, 2022 · 1 comment

Comments

@kekxv
Copy link

kekxv commented Nov 9, 2022

PRAGMA foreign_keys=ON;

@kekxv
Copy link
Author

kekxv commented Jun 22, 2023

it works under bazel:

    maybe(
        new_git_repository,
        name = "oatpp_sqlite",
        build_file_content = all_sqlite_content,
        init_submodules = True,
        # tag = "v0.16.5",
        commit = "c62750793e572f8692a242e731596a098e480ac3",
        shallow_since = "1651060543 +0300",
        remote = "https://github.com/oatpp/oatpp-sqlite.git",
        patch_cmds = [
            "sed -i.bak 's/\\/oatpp-${OATPP_MODULE_VERSION}\\/${OATPP_MODULE_NAME}/\\//g' cmake/module-install.cmake",
            # TODO enable foreign_keys
            "sed -i.bak 's/auto sqliteConn = std::static_pointer_cast<sqlite::Connection>(conn.object);/auto sqliteConn = std::static_pointer_cast<sqlite::Connection>(conn.object);sqlite3_exec(sqliteConn->getHandle(), \"PRAGMA foreign_keys=ON;\", NULL, NULL, NULL);/g' src/oatpp-sqlite/Executor.cpp",
        ],
    )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant