Skip to content

Commit 608684a

Browse files
committed
Updating documentation
1 parent 85921d8 commit 608684a

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

Documentation/Index.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff 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

14631463
This 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
14771467
if db.userVersion == 0 {

0 commit comments

Comments
 (0)