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

数据库默认数据无法插入 #2

Open
briefCodeHigh opened this issue Sep 26, 2024 · 1 comment
Open

数据库默认数据无法插入 #2

briefCodeHigh opened this issue Sep 26, 2024 · 1 comment

Comments

@briefCodeHigh
Copy link

briefCodeHigh commented Sep 26, 2024

1.后端项目启动后,库表新建了,但是菜单角色等默认数据没有插入成功
2.手动执行V1_1__init_data.sql脚本插入可以解决,但是数据库都是英文字段无法适配简体中文

update:
发现问题1是active profiles中使用了dev参数导致的。去掉可以导入默认数据,但依然没有简体中文

@dafengzhen
Copy link
Owner

  1. 当 spring.profiles.active = dev 时,Flyway 默认不启用,需手动执行数据库迁移脚本。如有需要,可通过设置 spring.flyway.enabled = true 来启用

  2. 初始数据为英文,如需修改为中文,可直接编辑对应字段,或通过后台进行修改

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

2 participants