Search code examples
mysqljdbcgoogle-apps-scriptgoogle-app-maker

Foreign Key column missing


I struggle to understand something that make no sense to me.

So I have a database under google app maker which have relation and foreign_key.

But one relation's foreign_key doesn't appear inside mysql terminal in Google Cloud Platform Cloud console / Google App Maker / Google App Script, but it works in appmaker.

I have a web app from google app script where I try to create Row using jdbc, but without the foreign_key, I can't finish what I started.

Today I have tried to add a new relation and it's foreign_key appears in the console.

I had already tried to contact the google support who don't know how to help me.

Things I tried:

I tried to rename a foreign_key to the foreign_key missing.

I tried to alter the sql table.

I tried to create manual a foreign_key

So Does anyone have any idea on how to bypass the foreign_key which doesn't appear?


Solution

  • Thank @TheMaster & @Morfinismo for the help.

    So i found the source of my problem.

    When you create a Many to Many relation in Google App Maker the Foreign_Key will not appear, it will create a jointure table to save all fk.

    Imagine you have two table A and B and you create a Many to Many it will create a new tablea Called A_Has_B and it will contaign two Foreign_key A_fk and B_fk.