Regarding the above problem, the primary and foreign keys need to be configured during development. I have two tables A and B, the company name column company_name in table A, and the attribution company column in table B. Table A is the main table and table B is the secondary table. .
Among them, the name in table A has data, but table B is a new column and no data has been written, so an error is reported. After adding data in table B, the primary and foreign key configuration is completed.