Skip to content

Commit fb19d93

Browse files
committed
added whitespace to some meta files
1 parent 9b48f51 commit fb19d93

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ addons:
1616
before_install:
1717
- export CC="gcc-4.9" CXX="g++-4.9"
1818
before_script:
19-
- npm run install-debug
19+
- npm run install-debug

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

TIPS.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Helpful tips for SQLite3
2+
23
## Creating good tables
4+
35
It's a good idea to use `INTEGER PRIMARY KEY AUTOINCREMENT` as one of the columns in a table. This ensures two things:
6+
47
- `INTEGER PRIMARY KEY`: improved performance by reusing SQLite3's built-in `rowid` column.
58
- `AUTOINCREMENT`: no future row will have the same ID as an old one that was deleted. This can prevent potential bugs and security breaches.
69

@@ -11,9 +14,11 @@ Any column with `INTEGER PRIMARY KEY` will automatically increment when setting
1114
It should be noted that `NULL` values count as unique from each other. This has implications when using the `UNIQUE` contraint or any other equality test.
1215

1316
## Default values
17+
1418
When a column has a `DEFAULT` value, it only gets applied when no value is specified for an `INSERT` statement. If the `INSERT` statement specifies a `NULL` value, the `DEFAULT` value is **NOT** used.
1519

1620
## Foreign keys
21+
1722
Foreign key constraints are not enforced if the child's column value is `NULL`. To ensure that a relationship is always enforced, use `NOT NULL` on the child column.
1823

1924
Example:
@@ -22,6 +27,7 @@ CREATE TABLE comments (value TEXT, user_id INTEGER NOT NULL REFERENCES users);
2227
```
2328

2429
Foreign key clauses can be followed by `ON DELETE` and/or `ON UPDATE`, with the following possible values:
30+
2531
- `SET NULL`: if the parent column is deleted or updated, the child column becomes `NULL`.
2632
- *NOTE: This still causes a constraint violation if the child column has `NOT NULL`*.
2733
- `SET DEFAULT`: if the parent column is updated or deleted, the child column becomes its `DEFAULT` value.

0 commit comments

Comments
 (0)