apollo icon indicating copy to clipboard operation
apollo copied to clipboard

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

Open MyGit-Z opened this issue 10 months ago • 2 comments

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

MyGit-Z avatar Apr 08 '24 10:04 MyGit-Z

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.

dosubot[bot] avatar Apr 08 '24 17:04 dosubot[bot]

#4782 中有一个初始版本

nobodyiam avatar Apr 09 '24 00:04 nobodyiam

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[bot] avatar May 09 '24 18:05 stale[bot]

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[bot] avatar May 18 '24 18:05 stale[bot]