Databases Becoming Add-ons
We have migrated AppHarbor SQL Server and MySQL databases to the add-on model. This will not affect running applications, nor will it have any near-team implications. Going forward, you need to be mindful of how you configure your application. Read on below.
The reason we are introducing this change is to have a unified process for adding resources to AppHarbor applications. This will greatly simplify our code and will make provisioning and billing simpler for developers using AppHarbor. By decoupling databases from the main AppHarbor application, it will also be easier for us to improve the database offering out of band from what goes on with AppHarbor.
The migration will not affect running applications, and current connectionstrings will continue to work. The alias-based connectionstring replacement is also still working for databases with aliases currently configured.
As is the case with connectionstrings we used to insert, the new ones are not compatible with Entity Framework. To properly configure an application using Entity Framework, you have to piece together your own connectionstring using the values in SQLSERVER_URI
(and similar for MySQL) which AppHarbor will insert into the appSettings
section of your web.config.
On a related note: Going forward, it's extremely important that configuration information such as connectionstrings and configuration for other provisioned add-ons is always read from the values inserted by the platform into web.config and not hardcoded in either code or web.config. This is because AppHarbor may dynamically change the configuration of a running application and redeploy it (to force a configuration reload). This becomes relevant if, for example, a database server goes down, and we need to move the databases and update all affected applications with the new configuration. Note that we don't expect this to become a regular occurrence, but we want to make sure developers engineer applications to tolerate such updates.
If you have any questions on how handle this migration or if you experience problems, feel free to drop us a line at support@appharbor.com.