File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -1457,21 +1457,11 @@ try db.run(users.drop(ifExists: true))
14571457
14581458### Migrations and Schema Versioning
14591459
1460- You can add a convenience property on `Connection` to query and set the
1460+ You can use the convenience property on `Connection` to query and set the
14611461[`PRAGMA user_version`](https :// sqlite.org/pragma.html#pragma_user_version).
14621462
14631463This is a great way to manage your schema’s version over migrations.
1464-
1465- ```swift
1466- extension Connection {
1467- public var userVersion: Int32 {
1468- get { return Int32 (try ! scalar (" PRAGMA user_version" ) as! Int64 )}
1469- set { try ! run (" PRAGMA user_version = \( newValue ) " ) }
1470- }
1471- }
1472- ```
1473-
1474- Then you can conditionally run your migrations along the lines of:
1464+ You can conditionally run your migrations along the lines of:
14751465
14761466```swift
14771467if db.userVersion == 0 {
You can’t perform that action at this time.
0 commit comments