-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Issue with Foreign Keys in SQL Table Creation #1172
Comments
Hello @sithu-go! I'm here to help you with any bugs, questions, or contributions. Let's work together to solve the issue you're facing. The issue you're encountering with foreign keys in the To resolve this, you should check the configuration settings in Yearning to see if this rule is enabled or if there are any restrictions on using foreign keys. If the rule is disabled, you will need to enable it to allow foreign key constraints in your SQL tables. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
@dosu. |
To enable foreign key constraints in the Yearning platform, you should set the type AuditRole struct {
// ...
DDLEnableForeignKey bool // 允许外键
// ...
} Ensure that this field is set to To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
I'm not a developer from yearning. How to set AuditRole in that struct. I just use this app. |
Could you provide more details about how you are accessing or using the Yearning platform? For example, are you using a web interface, a specific configuration file, or an API? This information will help me guide you on how to set the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
This is a tough nut to crack, could really use your help on this, @cookieY. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
I'm using docker ` does this docker version include DDLEnableForeignKey? |
Could you provide more information about the specific version of the Yearning platform you are using with Docker? Additionally, do you have access to any configuration files or environment variables that might allow you to adjust settings related to foreign keys? This information will help determine if the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
that is how my docker compose file looks like. services:
yearning:
image: yeelabs/yearning:latest
environment:
MYSQL_USER: yearning
MYSQL_PASSWORD: password
MYSQL_ADDR: mysql
MYSQL_DB: yearning
SECRET_KEY: secretKey
IS_DOCKER: is_docker
Y_LANG: en_US
ports:
- 8000:8000
# 首次使用请先初始化
command: /bin/bash -c "./Yearning install && ./Yearning run"
depends_on:
- mysql
restart: always
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: yearning
MYSQL_USER: yearning
MYSQL_PASSWORD: password
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
volumes:
- ./data/mysql:/var/lib/mysql
In docker hub, yeelabs/yearning is updated 3 months ago. Isit a problem? |
The Since you are using the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
I see the issue why it caused it. I make a pull request which fix that issue. |
Please provide titles that are straightforward and concise. exp: [Question] How to use or [Feature] Add new feature
The text was updated successfully, but these errors were encountered: