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

apollo2.1.0集成pgsql,求给一份pgsql的sql文件。mysql的不可以用 #5122

Closed
MyGit-Z opened this issue Apr 8, 2024 · 4 comments
Closed
Labels

Comments

@MyGit-Z
Copy link

MyGit-Z commented Apr 8, 2024

apollo2.1.0集成pgsql,求给一份pgsql的sql文件。mysql的不可以用

Copy link

dosubot bot commented Apr 8, 2024

Hey there, @MyGit-Z! 👋 I'm Dosu, your friendly neighborhood bot here to assist with bugs, answer questions, and guide you on your journey to becoming a contributor while we wait for a human maintainer to chime in. Looking forward to helping you out!

Based on the context provided, it appears that the SQL file located at scripts/sql/src/apolloconfigdb.sql in the Apollo 2.1.0 repository is written specifically for MySQL, not PostgreSQL. The file uses MySQL-specific features and syntax, such as AUTO_INCREMENT, ENGINE=InnoDB, DEFAULT CHARSET=utf8mb4, bit(1), backticks for quoting identifiers, COMMENT, and ON UPDATE CURRENT_TIMESTAMP. These features and syntax are not directly compatible with PostgreSQL.

Unfortunately, I couldn't find a PostgreSQL-specific SQL file in the Apollo 2.1.0 repository. You might need to manually convert the MySQL SQL file to PostgreSQL. This would involve replacing MySQL-specific features and syntax with their PostgreSQL equivalents. For example, you might replace AUTO_INCREMENT with SERIAL or BIGSERIAL, remove ENGINE=InnoDB and DEFAULT CHARSET=utf8mb4, replace bit(1) with BOOLEAN, replace backticks with double quotes, and so on.

Please note that this is a non-trivial task and requires a good understanding of both MySQL and PostgreSQL. You might also need to adjust your application code to work with PostgreSQL if it currently assumes a MySQL database.

I hope this information helps. If you have further questions or need more assistance, feel free to ask.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@nobodyiam
Copy link
Member

#4782 中有一个初始版本

Copy link

stale bot commented May 9, 2024

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 9, 2024
Copy link

stale bot commented May 18, 2024

This issue has been automatically closed because it has not had activity in the last 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

@stale stale bot closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants