@armen: because your trigger will explicitly supply the logic that the system couldn't implicitly figure out on it's own eg if there are multiple paths for a delete referential action then your trigger code will define which tables are deleted and in which [email protected]: I mean, only use triggers when constraints (maybe on combination) can't get the job done.Constraints are declarative and their implementations are the responsibility of the system.Refer to your database's documentation for instructions on how to properly enable this option.

updating tables with foreign key constraints-9

In other words: some of the records in Some Other Table are linked with Detail1-records and some of the records in Some Other Table are linked with Detail2 records.

Even if it is guaranteed that Some Other Table-records never belong to both Details, it is now impossible to make Some Ohter Table's records cascade delete for both details, because there are multiple cascading paths from Master to Some Other Table (one via Detail1 and one via Detail2). Here is a possible solution: All ID fields are key-fields and auto-increment.

Since most apparent cycles in RDBs occur in hierarchical structures (org chart, part, subpart, etc.) it is unfortunate that SQL Server assumes the worst; i.e., schema cycle == data cycle.

In fact, if you're using RI constraints you can't actually build a cycle in the data!

Your comment helped me a lot to understand the problem that I am facing. I would prefer turning off the cascade delete for one of the path, then handle delete of other records some other ways(stored procedures; triggers; by code etc).

But I keep your solution(grouping in one path) in mind for possible different applications of same problem...

These options simply pre-fill the generated migration stub file with the specified table: Some migration operations are destructive, which means they may cause you to lose data.

In order to protect you from running these commands against your production database, you will be prompted for confirmation before the commands are executed.

If you are running a version of My SQL older than the 5.7.7 release or Maria DB older than the 10.2.2 release, you may need to manually configure the default string length generated by migrations in order for My SQL to create indexes for them.

You may configure this by calling the option for your database.

To force the commands to run without a prompt, use the Before renaming a table, you should verify that any foreign key constraints on the table have an explicit name in your migration files instead of letting Laravel assign a convention based name.