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
Copy file name to clipboardExpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# PHPFramework Documentation
2
2
3
-
This documentation refers to version 1.3 of [our fork](https://github.com/app-zap/PHPFramework) of the [PHPFramework](https://github.com/Luzifer/PHPFramework) which was developed by Knut Ahlers.
3
+
This documentation refers to version 1.4 of [our fork](https://github.com/app-zap/PHPFramework) of the [PHPFramework](https://github.com/Luzifer/PHPFramework) which was developed by Knut Ahlers.
4
4
5
5
Don't worry, there will be a new name soon to get rid of this confusion.
PHPFramework ships with a DatabaseMigrator which allows you to execute SQL files automatically. The migrator works only one-way at the moment.
4
+
5
+
## How it works
6
+
7
+
The migrator must be enabled and a directory must be provided (see the Configuration section for the details).
8
+
9
+
If it is enabled it is invoked on every call to the framework at an early point of execution (from a Signal in the constructor of the Dispatcher).
10
+
11
+
It executes numbered `.sql` files in the right order and remembers the last executed number. Each file is only executed once.
12
+
13
+
At the moment the `.sql` files must start at `1` and must increase without omitting any numbers. ([It's planned](https://github.com/app-zap/PHPFramework/issues/24) to change that to be less restricitive).
14
+
15
+
Files can either just contain the number as filename (`21.sql`) or also description separated from the number by underscore (`22_user_table.sql`).
16
+
17
+
All files must be directly in the configured directory. Subdirectories are not supported at the moment.
0 commit comments