27 Commits (006c5fc2425f5aa060d2911c175dae6b6b1a19f3)

Author SHA1 Message Date
Tom Hacohen 0ac41e77e8 Fix DB errors when using MySQL/MariaDB.
Fixes #69.
4 years ago
Tom Hacohen a7fdb4a108 More typing fixes. 4 years ago
Tom Hacohen 709bc6c1fc Improve typing information. 4 years ago
Tom Hacohen 174e54681d Improve type annotations. 4 years ago
Tom Hacohen 7571261479 Remove unused imports. 4 years ago
Tom Hacohen baa42d040d Collection: also save the collection UID on the model itself.
This enables us to have db-constraints for making sure that UIDs are
unique, as well as being more efficient for lookups (which are very
common).

The UID should always be the same as the main_item.uid, though that's
easily enforced as neither of them is allowed to change.
4 years ago
Tom Hacohen 2d0bcbdc20 Stoken annotation: move it all to one place to reduce duplication. 4 years ago
Tom Hacohen 4ce96e043e Collection: further improve stoken performance.
We merged the two queries into one and we made it like in the view, so we
can now merge the two instead of having two implementations.
4 years ago
Tom Hacohen bb070639a3 Collection: fix the slow performance when calculating stoken.
We were running a very expensive query instead of the much simpler and
more efficient alternative we just introduced.
4 years ago
Tom Hacohen c790b5f489 Reformat some files using black. 4 years ago
Tal Leibman d8e5c37db1
Use black for code formatting and format the code
Merge #65
4 years ago
Tom Hacohen 5d8a92f000 Collections: add support for collection types.
We also added the field for invitations, as it's needed for collections
to work.
4 years ago
Tom Hacohen 5d9b47531b Collectin: make sure collections always have a unique UID. 4 years ago
Tom Hacohen 18b3f45b79 Collection main_item: make a OneToOneField intsead of just a foreign key. 4 years ago
Tom Hacohen d90931fbe5 Make access level an int instead of a string.
We started with a string because we thought it could maybe provide more
flexibility, though really, an int makes much more sense, especially on
all the platforms etebase runs nowadays.
4 years ago
Tom Hacohen e385aa8f20 Chunks: use a prefix of the chunk for a subdirectory.
Filesystems don't handle massive directories too well, so better to split.
Using the prefix of the chunk gives us a maximum of 64 * 64 = 4096 entries
in the main directory.
4 years ago
Tom Hacohen 393b85d3ca Chunks: move to reside under the collection. 4 years ago
Tom Hacohen 1d5baece1e Chunk uploading: implement properly using a custom Parser. 4 years ago
Tom Hacohen a7268443ca Add support for a modifying the chunk storage location 4 years ago
Tom Hacohen 86c5d711a6 Chunk upload: item.uid can never be None so use it directly. 4 years ago
Tom Hacohen 785e4fae97 Merge the uidvalidator with the base64url validator and set a min length. 4 years ago
Tom Hacohen c00cf50163 Revision: remove salt field.
It's not really needed. More information in the respective change
in the js client.
4 years ago
Tom Hacohen 2b52eec41f Allow chunk UIDs to be longer. 4 years ago
Tom Hacohen 1bed39af9d Collection/item uid: allow base64-url not just base62. 4 years ago
Tom Hacohen 291ebaa3f7 Items must have a uid now (not null).
This is due to the previous change.
4 years ago
Tom Hacohen 267d749c45 Collection: change collections to be an extension of items
Each collection now has an item and the item's UID is the collections
UID. This lets us manipulate collections just like items, and as part of
transactions. This is significant because it lets us change them as part
of transactions!
4 years ago
Tom Hacohen d1017aac76 Rename django_etesync to django_etebase. 4 years ago