Skip to content
Back

Dart Angel 3 ORM- Create Tables in Mysql with fks.

  • 0
  • Flutter
Philac
26 May, 2025, 09:42

Hello, I am working with dart Angel 3 object relational model and Mysql 8.0.32. I wander if someone had successed to pass foreign keys in tables. I can run migrations files and create few tables. Then i try to append it with foreign keys in other migrations' files but nothing change in the table. The related tables are well created before. The logger return that there is nothing to add in migrations whereas it had to modify it with fks. I didn't see a specific method to had fks in the framework. Does it exist somewhere?

I let de function up of migration's files : @override Future<void> up(Schema schema) async {

TypeScript
schema.alter('Users', (table) {
  var addressRef = table.integer('address_id').references('addresses', 'id');
  addressRef.onDeleteCascade();

}

TL;DR
The developer is working with Dart Angel 3 ORM and Mysql 8.0.32, trying to add foreign keys to tables using migration files. Despite attempting to modify tables to include foreign keys, it isn't reflecting the changes. They posted the function from the migration file.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more