How to add existing tables

@mark.breuss found out that it is now possible to add existing tables to an app.

I have tried, but I wasn’t able.

I have never created a new database. All my apps share the same Users table and a few more tables, so I assume all the tables should be available for sharing by all the apps.

I opened an app, pressed Ctrl+F5 to make sure the IDE code is refreshed, clicked on + Add Existing Table...:

image

And I got this:

What am I missing?

It’s working for me. Could it have something to do with your dedicated server?

1 Like

That’s definitely a bug! @hugetim is right that it is related to the Dedicated database, and we’re investigating now.

[Moved to bug reports]

2 Likes

Continuing the discussion from Sneaky Anvil Updates (Add Existing Database):

  1. I do have other Apps, with their own Databases. They might not be using the Beta IDE, though. Is that a requirement for seeing them here?
  2. What in the world does the lower left button say?
2 Likes

I’ve moved @p.colbert’s post here, as it’s an instance of the same bug.

@stefano.menci This bug should now be fixed, so you should be able to add tables and databases from all your apps.

@p.colbert You can only share additional databases between apps, not Default Databases. I suspect that the app you were looking at already had access to the only additional databases in your account, so there were no more available to add. You can try this from a different app and it should show those databases. We have updated the UI, and of course all this will be documented.

2 Likes

It works now, thank you!

@daviesian, I am confused, these 3 statements are conflicting:

  • You said “You can only share additional databases between apps, not Default Databases”
  • According to the UI every app of mine has its own database (see snapshot below, where every app has its own “Default Database”)
  • My apps don’t have additional databases and share the same tables

What is the difference between the Users table of the Default Database of the Logger app and the Users table of the Default Database of the Master Schedule app?
It sounds like they belong to two different Default Databases, but they are the same table…

One more question: if we can share tables from different databases, then what is the point of making multiple databases? I thought multiple databases were used to isolate, that to prevent access to a set of tables. (I guess it shows that I have never used multiple databases)

image

1 Like

I think the key distinction is between sharing a database (a defined collection of tables that can be associated with a deployment environment–which cannot be shared if it’s an app’s Default) and sharing a table (which can always be shared).

So in my app, I have a Default/dev database and a production database. I use the former for testing. Up until now, the tables in those two databases have been isolated from each other. But now, as an example, I’m thinking it may make sense to share certain tables between them, ones that don’t contain user data but rather other storage like media files I use in the UI.

4 Likes

This is no longer fixed for me. When searching by app name to link an existing database, nothing shows up.