Felipe Martin Garcia
c8fec2a265
fix: remove manual transaction on sqlite migration 2 ( #468 )
2022-08-11 13:40:17 +02:00
Andriy Kushnir
0246e10dff
feat: improve performance for sqlite queries ( #425 )
...
* [sqlite] Added has_content column and relevant migration
* Fix typo in docstring
* [sqlite] Fetch content for bookmarks separately
* [sqlite] Store has_content alongside with bookmark
* [sqlite] Rename variable to distinguish it from main query
* [sqlite] Use by-reference instead of no-op copy
* [sqlite] Reduce queries count from ≈30 to 1 to fetch tags
* Lint fixes
* Make minor logging improvements
* Wrap entire migration in transaction block
* Added «down» migration
* Drop workaround for old SQLite versions
2022-08-08 20:52:33 +02:00
hulb
8732fd7b6d
implement migration for mysql & postgres ( #422 )
2022-05-03 23:30:28 +02:00
Felipe Martin Garcia
81d52a2e24
feat: sqlite migrations ( #398 )
...
- Moved migrations from code to SQL files
- Using golang-migrate/v4
- Added a new CLI command: migrate
2022-03-26 08:33:57 +01:00
Tung Le
ca3cc11b2d
sqlite: remove unneeded LEFT JOIN to improve performance ( #387 )
...
* sqlite: remove unneeded LEFT JOIN to improve performance
* Fix handling join clause in GetBookmarks
* Revert changes in GetBookmarks
2022-03-10 23:32:58 +01:00
n8225
2b4fd9f0cb
Remove unneeded alter table transactions from sqlite ( #372 )
2022-02-14 19:49:46 +01:00
Felipe Martin Garcia
0bd297d63c
fix: update bookmark on sqlite database ( #367 )
...
It used an update and insert at the same time, since the virtual table
cannot have constrants nor upserts we need to try an update the
bookmark content to check for it's existence, inserting it only if the
update fails (don't affect any rows).
This will need to be improved in the future, since not all bookmark
updates require modification of the content table (in my case, I was
testing only updating tags).
2022-02-13 21:28:40 +01:00
Felipe Martin Garcia
a76b121098
fix: golangci-lint errors ( #366 )
2022-02-13 16:38:27 +01:00
n8225
f1c98a8e98
Update Dependencies and Replace mattn/go-sqlite with modernc.org/sqlite ( #345 )
...
* No more CGO
* Update all dependencies to current
* Only test against go 1.17.
2022-02-11 13:59:49 +01:00
Dean Jackson
32f9d2695f
Explicit charset for MySQL connection
2019-12-13 08:52:26 +01:00
Radhi Fadlillah
9ba9d1eced
Fix: wrong query in PostgreSQL
2019-10-03 21:47:03 +07:00
Radhi Fadlillah
a4dd1c8687
Specify character set when creating MySQL table #188
2019-10-03 21:02:25 +07:00
bvp
4eb86d60d7
Initial PostgreSQL support
2019-09-24 19:59:25 +03:00
Dean Jackson
988f2d6502
Use single quotes for better compatibility
2019-09-22 19:15:04 +02:00
Dean Jackson
ddf7c37208
Fix MySQL column definitions
...
- Add AUTO_INCREMENT to `id` fields
- Fix DEFAULT definitions on TEXT/BLOB fields
TEXT/BLOB field default values must be expressions:
https://dev.mysql.com/doc/refman/8.0/en/data-type-defaults.html
2019-09-22 18:58:26 +02:00
Dean Jackson
76a7856f80
Add specific size to bookmark_url key
...
MySQL can't index an entire TEXT field; the key must be truncated
https://stackoverflow.com/a/1827099
2019-09-22 18:49:11 +02:00
Radhi Fadlillah
df98c281d3
Make MySQL address changeable #156
2019-09-22 08:25:34 +07:00
Radhi Fadlillah
89aad30a17
Fix: missing column while updating database
2019-08-29 09:45:45 +07:00
Radhi Fadlillah
c22f904bdd
If there are no owner yet, allow to use default account
2019-08-22 14:34:36 +07:00
Radhi Fadlillah
6b39742a35
Make SQLite database compatible with old version
2019-08-22 14:27:38 +07:00
Radhi Fadlillah
0c4d75f773
Add basic account level management
2019-08-12 19:57:18 +07:00
Radhi Fadlillah
4e76288e09
Add method to exclude or include some tags
2019-08-11 15:55:31 +07:00
Radhi Fadlillah
667e5b2e74
Initial MySQL support
2019-08-10 08:13:13 +07:00
Radhi Fadlillah
20e89216f0
Add option to mark if bookmark archive is public
2019-08-08 20:16:25 +07:00
Radhi Fadlillah
ea73eaff64
Add method for renaming tag
2019-08-07 23:30:17 +07:00
Radhi Fadlillah
bc9aa7f634
Now search look at excerpt as well
2019-08-07 10:56:12 +07:00
Radhi Fadlillah
3503484c2b
Add account management in web interface
2019-05-31 22:41:29 +07:00
Radhi Fadlillah
3b8dead04d
Implement edit bookmark in web interface
2019-05-30 10:07:20 +07:00
Radhi Fadlillah
093b398b2f
Implement add bookmark in web interface
2019-05-28 17:05:11 +07:00
Radhi Fadlillah
61bd8244a6
Initial new web interfaces
2019-05-27 17:01:53 +07:00
Radhi Fadlillah
4ab1253f8c
Implement logic for import cmd
2019-05-23 09:22:47 +07:00
Radhi Fadlillah
9a9baf9f91
Implement logic for update cmd
2019-05-22 16:13:52 +07:00
Radhi Fadlillah
3b4f9bf248
Add logic for delete cmd
2019-05-22 08:13:52 +07:00
Radhi Fadlillah
659a3291d8
Implement logic for add and print cmd
2019-05-21 23:24:11 +07:00
Radhi Fadlillah
1e099fbd27
Restructure project directories
2019-05-21 10:31:40 +07:00