You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add requirements for using Flyway
* Address AI and vale comments
* Remove sections about postgresql dependency
* Add links to the existing Flyway docs page
Copy file name to clipboardExpand all lines: articles/control-center/database/flyway-migrations.adoc
+11-23Lines changed: 11 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Control Center provides a simple way to set up Flyway migrations to initialize y
14
14
15
15
== Control Center Starter
16
16
17
-
Adding the Control Center Starter to your project dependencies brings in the Flyway dependency. This allows you to manage your database migrations easily. If you haven't already done so, add the Control Center Starter to your project.
17
+
If you haven't already done so, add the Control Center Starter to your project. You also need to ensure that you have the Flyway PostgreSQL dependency in your project.
18
18
19
19
.pom.xml
20
20
[source,xml]
@@ -23,31 +23,19 @@ Adding the Control Center Starter to your project dependencies brings in the Fly
Once this dependency is added, any migrations you create are automatically detected and applied to your database when the application starts.
34
+
Once these dependencies are added and the Database feature is enabled, any migrations you create are automatically detected and applied to your database when the application starts.
29
35
30
-
[NOTE]
31
-
====
32
-
If you want to use the Control Center Starter without Flyway migrations, you can disable them by setting the `spring.flyway.enabled` property to `false` in your `application.properties` or `application.yaml` file:
36
+
For more information about how to setup Flyway in your application, see the <<{articles}/building-apps/forms-data/add-flyway#,Add Flyway>> page.
33
37
34
-
[.example]
35
-
--
36
-
.application.properties
37
-
[source,properties]
38
-
----
39
-
spring.flyway.enabled=false
40
-
----
41
-
42
-
.application.yaml
43
-
[source,yaml]
44
-
----
45
-
spring:
46
-
flyway:
47
-
enabled: false
48
-
----
49
-
--
50
-
====
38
+
NOTE: The Database feature must be <<../database#provisioning-a-database,enabled>> in order for Flyway migrations to be applied to the Control Center-managed database. If you have not already enabled the Database feature, you can do so during the deployment of your application or for an application that is already deployed.
51
39
52
40
53
41
== Migration Files
@@ -73,7 +61,7 @@ More information about Flyway migration files can be found in the https://flyway
73
61
74
62
== Viewing Migration Status
75
63
76
-
If you have <<../database#provisioning-a-database,enabled the Database feature>>, you can view the status of your Flyway migrations in the Control Center UI.
64
+
You can view the status of your Flyway migrations in the Control Center UI.
77
65
78
66
To view the details of the applied migrations, first select the relevant application from the [guilabel]*Application Selector*, as shown in the screenshot here.
Copy file name to clipboardExpand all lines: articles/control-center/database/index.adoc
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,9 @@ Control Center provides a simple way to provision a database for your Vaadin app
14
14
15
15
You can enable the Database feature either during the deployment of your application or for an application that is already deployed. When enabled, Control Center automatically provisions a dedicated PostgreSQL database exclusively for that application. If your application is configured to use a Spring datasource, the necessary connection details are set up automatically.
16
16
17
+
17
18
== Database Migrations
18
19
19
20
A database migration is a process that manages incremental, reversible changes to a database schema over time. Migrations allow you to evolve your database structure safely and predictably, ensuring that your application and its data remain consistent as requirements change.
20
21
21
-
Control Center integrates with Flyway for managing database migrations. When you enable the Database feature, Control Center automatically detects and applies Flyway migration scripts to the newly provisioned database. This ensures that your database schema is always up to date with your application's requirements. For more information about Flyway migrations, see the https://flywaydb.org/documentation/[Flyway documentation].
22
-
23
-
For more information about how to use Flyway migrations with Control Center, see the <<./flyway-migrations#,Flyway Migrations>> page.
22
+
Control Center integrates with Flyway for managing database migrations. For more information about how to setup Flyway in your application, see the <<{articles}/building-apps/forms-data/add-flyway#,Add Flyway>> page. For more information about how to use Flyway migrations with Control Center, see the <<./flyway-migrations#,Flyway Migrations>> page.
0 commit comments