Apart from the table structure of mvp and m_strk, which both have a design flaw caused by incorrect sequence of columns, your code runs fine for me.
Let's address the design problem.
CREATE TABLE `mvp` (
`mvp_idtype_id` varchar(12) NOT NULL DEFAULT (concat(`idtype`,_utf8mb4'-',lpad(`id`,4,_utf8mb4'0'))),
`idtype` int NOT NULL,
`id` int NOT NULL,
`first_name` varchar(75) NOT NULL,
`mid_name` varchar(75) DEFAULT NULL,
`last_name` varchar(75) NOT NULL,
`donation_bb_id` int DEFAULT NULL,
`donation_report_to` varchar(75) DEFAULT NULL,
`donation_nok_name1` varchar(75) DEFAULT NULL,
PRIMARY KEY (`mvp_idtype_id`),
KEY `mvp_pk` (`idtype`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ENCRYPTION='N';
Apart from the ENCRYPTION attribute which is set to N due to the lack of master key, the table can be created exactly like the original one. However, its primary key mvp_idtype_id has a default value which is based on columns (idtype and id) AFTER it. This will cause the default value fail to acquire values from those base columns as their values have yet to be determined.
insert mvp values
(default,1,1,'a','b','c',1,'aa','bb'),
(default,2,2,'a2','b2','c2',2,'aa2','bb2');
ERROR 1062 (23000): Duplicate entry '0-0000' for key 'mvp.PRIMARY'
Unless you change the table structure to place the PK after the said columns, or change the value sequence in the INSERT statement, the PK cannot procure a correct default value. Here is an example of INSERT statement with arranged value sequence.
insert mvp (idtype,id,mvp_idtype_id,first_name,mid_name,last_name,donation_bb_id,donation_report_to,donation_nok_name1) values
(1,1,default,'a','b','c',1,'aa','bb'),
(2,2,default,'a2','b2','c2',2,'aa2','bb2');
select * from mvp;
+---------------+--------+----+------------+----------+-----------+----------------+--------------------+--------------------+
| mvp_idtype_id | idtype | id | first_name | mid_name | last_name | donation_bb_id | donation_report_to | donation_nok_name1 |
+---------------+--------+----+------------+----------+-----------+----------------+--------------------+--------------------+
| 1-0001 | 1 | 1 | a | b | c | 1 | aa | bb |
| 2-0002 | 2 | 2 | a2 | b2 | c2 | 2 | aa2 | bb2 |
+---------------+--------+----+------------+----------+-----------+----------------+--------------------+--------------------+
Now we create the second table.
CREATE TABLE `m_strk` (
`mvp_idtype_id` varchar(12) DEFAULT (concat(`idtype`,_utf8mb4'-',lpad(`id`,4,_utf8mb4'0'))),
`idtype` int NOT NULL,
`id` int NOT NULL,
`sno` int NOT NULL,
`sdate` date DEFAULT NULL,
`add_date` datetime DEFAULT CURRENT_TIMESTAMP,
KEY `m_strk_pk` (`idtype`,`id`),
CONSTRAINT `m_strk_fk` FOREIGN KEY (`idtype`, `id`) REFERENCES `mvp` (`idtype`, `id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ENCRYPTION='N';
Table m_strk was created with no problem. Again, the ENCRYPTION is set to 'N', and using of the DEFAULT value for the first column mvp_idtype_id calls for extra care even though it's not a PK in this table (Not being a PK makes the situation worse as there will be no constraint for the ill-gotten duplicate values).
Next we populate the table with valid rows.
insert m_strk (idtype,id,mvp_idtype_id,sno,sdate,add_date) values
(1,1,default,111,null,default),
(2,2,default,222,null,default);
select * from m_strk;
+---------------+--------+----+-----+-------+---------------------+
| mvp_idtype_id | idtype | id | sno | sdate | add_date |
+---------------+--------+----+-----+-------+---------------------+
| 1-0001 | 1 | 1 | 111 | NULL | 2025-05-08 11:51:18 |
| 2-0002 | 2 | 2 | 222 | NULL | 2025-05-08 11:51:18 |
+---------------+--------+----+-----+-------+---------------------+
insert m_strk (idtype,id,mvp_idtype_id,sno,sdate,add_date) values
(3,3,default,333,null,default);
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`testdb`.`m_strk`, CONSTRAINT `m_strk_fk` FOREIGN KEY (`idtype`, `id`) REFERENCES `mvp` (`idtype`, `id`))
The last statement failed due to the FK check.
Then we add a new column using your code and drop the FK on m_strk.
ALTER TABLE mvp
ADD donation_nok_last_verified DATE DEFAULT NULL NULL
AFTER donation_report_to;
Query OK, 0 rows affected (0.03 sec)
Records: 0 Duplicates: 0 Warnings: 0
alter table m_strk drop foreign key `m_strk_fk` ;
Query OK, 0 rows affected (0.02 sec)
Records: 0 Duplicates: 0 Warnings: 0
Both statements ran successfully. So let's proceed with your final job of applying changes to m_strk to add the FK on m_strk referencing mvp. Again, you did not provide a statement, and also did not define how the FK should be built, so I have to write one assuming to add the previously dropped FK back.
alter table m_strk add foreign key (`idtype`, `id`) REFERENCES `mvp` (`idtype`, `id`);
Query OK, 2 rows affected (0.06 sec)
Records: 2 Duplicates: 0 Warnings: 0
Why does adding a column to a table result in an index error and how can I work around it
No problem has been encountered using (primarily) your code.