If you have an existing app that uses data stored in a cloud storage provider such as GDrive, and you want to move the app to a SQL database, you can do so by copying the app in the app editor. This feature is currently supported for the following database types: SQL Server, MySQL, MariaDB, and PostgreSQL.
In the app editor, navigate to Manage > Author and click on "Copy App". In the dialog box, select the desired database as the destination where the cloned app will be created. Note the database must be an existing data source in your account. Also, make sure the setting "Make a copy of the data for the new app" is turned on.
Once you have selected a database, click "Copy app" and AppSheet will automatically copy all of the tables in your app to the database. There are a few important things to keep in mind:
AppSheet will auto-generate the names of the tables. However, these names tend to be long since we need to avoid duplicate table names that already exist in the database.
Since AppSheet has no knowledge of the design of your database, we are unable to create foreign keys to link the new tables with existing tables. Also, AppSheet will not create foreign key constraints for references between AppSheet tables.
There is no one-to-one mapping between SQL data types and AppSheet data types. As such, the SQL data types that AppSheet select for columns in your SQL tables are only "educated guesses" based on their corresponding data types in AppSheet. For instance, a Decimal column in AppSheet can be a Decimal or a Float column in SQL, but AppSheet will choose the Decimal SQL column type by default.
Image/file columns in AppSheet will not be converted to blob or binary columns in SQL. This is because images/files will still be stored in a cloud storage provider such as Google Drive. The column in SQL will only store the file paths.
AppSheet will not generate any trigger or stored procedure for the copied tables.
Any expression or script in the source spreadsheets will not be copied over to the database.
In a sense, the SQL tables generated by AppSheet are very basic tables that do not take full advantage of the power of a traditional database. The main purpose of copying an existing app to a database using AppSheet is therefore mainly to speed up the transfer of data from the spreadsheets to the database. We strongly recommend that the app creator modify the generated SQL tables to best meet the design requirements of the database after the app has been copied.