Commit graph

138 commits

Author SHA1 Message Date
zotlabs
bf580fcc06 Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2017-05-23 16:14:41 -07:00
zotlabs
3a9e5f0f98 schema fixes 2017-05-23 21:48:58 +02:00
zotlabs
36a960adec schema fixes 2017-05-22 00:57:56 -07:00
zotlabs
3916d5c567 always wonder about people who say "do as I say, not as I do..." 2017-05-14 18:37:36 -07:00
zotlabs
f840082aae Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2017-05-05 16:58:46 -07:00
zotlabs
519aef7ff5 abook_not_here flag created to indicate singleton connections which are connected to this channel but not on this hub. abook_instance enumerates which hubs the connections is valid, but we ultimately need something more efficiently searchable to decide what operations are supported w/r/t this connection in the context of this hub. This flag is ignored during sync to clones although the code to set it correctly during channel creation, import, and sync has not yet been implemented. 2017-05-03 18:50:32 -07:00
zotlabs
88149f56bb Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2017-04-26 20:11:12 -07:00
zotlabs
7d5ee81628 database support for client side e2ee for private mail 2017-04-25 21:52:24 -07:00
zotlabs
f1c6fd08c4 database upgrade 2017-04-23 20:28:04 -07:00
zotlabs
60d4b4c4f6 remove fulltext indexes for innodb 2017-04-12 20:21:56 -07:00
zotlabs
4a6a06fdc0 change default database settings 2017-04-12 20:20:46 -07:00
zotlabs
1c32564536 backend infrastructure for 'channel protection password'; which will be used to optionally encrypt export files and resolve channel/identity ownership/hijacking disputes 2017-04-12 18:46:15 -07:00
zotlabs
d7f4526a00 backend infrastructure for 'channel protection password'; which will be used to optionally encrypt export files and resolve channel/identity ownership/hijacking disputes 2017-04-12 17:32:28 -07:00
zotlabs
6f3493bb3c db issues 2017-03-12 15:50:47 -07:00
zotlabs
d5d67708ac Alter the queue so that each queue item stores the scheduled time of the next delivery. This keeps the query for
queued items simple. We no longer group by posturl; as the queue update function will only keep one item per destination
scheduled for shorter term processing. Others (multiple queued items for a single destination) will be scheduled for
delivery far into the future and only delivered if the hub responds to the "active" or short term queue item.
2017-01-29 14:45:25 -08:00
zotlabs
bb85e139f1 more vcard work 2016-12-21 15:03:33 -08:00
zotlabs
bae28965ab issue #446 apps usability - disable app if attached to a plugin that is uninstalled, allow system apps to be soft deleted and undeleted from the edit pane. 2016-12-14 19:11:01 -08:00
zotlabs
6e016c439c db update required for Zot2 2016-11-22 14:15:33 -08:00
zotlabs
facc6ee6b3 allow hooks to have negative priority 2016-10-12 20:04:19 -07:00
redmatrix
cacdac16aa next wave of nulldate fixes 2016-09-26 18:16:43 -07:00
redmatrix
c2f83639d4 provide version info in /pubsites 2016-09-07 17:36:45 -07:00
redmatrix
de4f9d68bd Merge branch 'dev' into perms 2016-07-17 21:40:04 -07:00
redmatrix
94bd53c0f1 schema updates for zot access tokens 2016-07-14 20:51:15 -07:00
redmatrix
6424bac47c Merge branch 'dev' into perms 2016-07-12 20:50:27 -07:00
redmatrix
b6987b4287 the abconfig defaults weren't changed in the schema files when they were changed in the code 2016-07-12 13:15:20 -07:00
redmatrix
e11330a5c8 revise how we store perm_limits 2016-07-07 16:44:58 -07:00
redmatrix
c918bbba25 more work on x permissions 2016-07-03 17:10:00 -07:00
redmatrix
51e2ef39c2 db update for abconfig transition 2016-06-23 18:35:01 -07:00
redmatrix
dbb0a0283f schema changes needed for the caldav client bit 2016-06-18 15:33:47 -07:00
redmatrix
a9d7acda27 the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
redmatrix
b1259876bf more db column renames 2016-05-31 21:45:33 -07:00
redmatrix
dfb6255f59 more removal of reserved words from DB schemas 2016-05-31 17:50:47 -07:00
redmatrix
ca78374f30 remove unused tables 2016-05-30 22:41:45 -07:00
redmatrix
6602ff83dd start removing reserved words from database column names (this run: addon and hook) 2016-05-30 19:44:30 -07:00
redmatrix
ac4688eac0 allow objs to represent inventory 2016-05-27 23:57:47 -07:00
redmatrix
3df0bb5522 some preliminary structural work for app organisation 2016-05-03 18:41:16 -07:00
redmatrix
bd2f11ed8b db schema change to add tags to content sources 2016-05-01 21:00:02 -07:00
redmatrix
1ff189ee90 new hook interface (the old one still works but requires handlers to have two calling arguments; the first of which is no longer used). The new interface is called from Zotlabs\Extend\Hook::register() and allows you to specify which hook version to use. The default will be the new interface with one function argument. We also implement the hook priority field which was always there but needed to be set manually in the DB. This provides a way for two hook handlers that implement the same hook interface to determine which order to be called in the event of conflicts. 2016-04-21 17:03:05 -07:00
redmatrix
be2b7c0b5f abconfig 2016-02-29 19:31:52 -08:00
redmatrix
6300f47cdc schema change to support channel move (a completely different operation than channel clone) 2016-02-24 17:00:16 -08:00
Bob Mottram
29c9e7c0a2 Remove stray comma 2016-02-23 19:50:45 +00:00
redmatrix
76bf892f9f iconfig - add sharing variable 2016-02-18 00:20:08 -08:00
redmatrix
4da7fcb41d schema updates for iconfig 2016-02-17 16:24:26 -08:00
redmatrix
2aa3acae6b remove deprecated table 2015-12-15 19:46:24 -08:00
redmatrix
36ef1d1bc6 move the instance stuff to abook where it belongs 2015-12-05 13:24:58 -08:00
redmatrix
ea37882b95 Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	include/zot.php
	install/schema_mysql.sql
	install/schema_postgres.sql
	install/update.php
	mod/zfinger.php
2015-10-19 16:18:04 -07:00
redmatrix
57e0bfc5a9 add the project name to site info packet 2015-10-19 16:07:14 -07:00
redmatrix
93f061f78a mail sync/migrate continued; also abstract delivery loop to make it re-usable, change refresh_all to use delivery loop. 2015-10-15 18:52:04 -07:00
redmatrix
edbcba6f11 schema support for additional site types 2015-09-28 04:15:21 -07:00
redmatrix
0f3c2c4b24 add vdata field for caldav 2015-09-23 22:32:46 -07:00
redmatrix
0b1b11ea53 heavy lifting for delivery reports 2015-09-22 02:32:04 -07:00
redmatrix
40bb1699a5 DB table for delivery reports 2015-09-18 22:55:47 -07:00
redmatrix
669e111118 add timestamps for syncing apps 2015-09-02 21:07:24 -07:00
redmatrix
3852b5ce7f separate objs/things from taxonomy 2015-09-01 17:06:58 -07:00
redmatrix
d7089ab471 Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	include/identity.php
	install/update.php
	util/messages.po
	view/nl/messages.po
2015-08-31 21:00:28 -07:00
redmatrix
d7cf7316be change the likes db structure to make it more easily importable/exportable 2015-08-31 20:55:25 -07:00
redmatrix
43fbbfe0df Merge https://github.com/redmatrix/redmatrix into pending_merge 2015-08-20 22:14:51 -07:00
redmatrix
fef93af0a6 missed this one - it's required 2015-08-20 22:13:25 -07:00
redmatrix
3b1554db2e Merge https://github.com/redmatrix/redmatrix into pending_merge 2015-08-18 17:15:53 -07:00
redmatrix
37d07a7d2a add event_sequence for vtodo's 2015-08-18 17:10:40 -07:00
redmatrix
6a1d1867f0 Merge https://github.com/redmatrix/redmatrix into pending_merge 2015-08-16 19:13:29 -07:00
redmatrix
b3b566c907 add DB support for tasks, todo items and repeating events 2015-08-16 17:17:34 -07:00
redmatrix
6e8ad5089e Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	view/nl/messages.po
	view/nl/strings.php
2015-06-29 18:01:51 -07:00
redmatrix
63f2e9b412 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	include/zot.php
	mod/connedit.php
	util/messages.po
2015-06-28 22:33:13 -07:00
redmatrix
de13497333 no this isn't it. well ok, it's part of it, but not the important part. it's still pretty cool. 2015-06-28 21:16:56 -07:00
redmatrix
859a2ac8ef DB changes for some channel flags 2015-06-15 17:28:52 -07:00
redmatrix
41085ae03f start on the DAV/photos merger 2015-06-11 22:32:08 -07:00
redmatrix
ca870dbf31 more work on item table optimisation 2015-06-10 16:59:04 -07:00
redmatrix
03357481f7 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	install/schema_mysql.sql
	mod/home.php
	mod/page.php
	view/nl/messages.po
	view/nl/strings.php
2015-06-09 16:52:00 -07:00
redmatrix
39f0e6fe62 add site_dead flag to prevent delivery to dead sites. Allow sys channel webpages to be viewed even if site is configured "block public". 2015-06-08 16:55:17 -07:00
redmatrix
8fe3daab21 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	install/schema_mysql.sql
	mod/impel.php
	view/pt-br/messages.po
	view/pt-br/strings.php
2015-05-28 19:06:31 -07:00
redmatrix
0f09a4499b add menu_created, menu_edited fields to DB 2015-05-28 16:59:56 -07:00
redmatrix
e68a00d381 more db structure 2015-05-19 22:43:24 -07:00
redmatrix
da7abbb089 bring the new photo schema into play 2015-05-18 19:43:53 -07:00
redmatrix
af27457da5 here's a fair chunk of the new schema - still a lot of bits missing and no migration tools, and only for mysql currently. Oh, and you still don't have the new code to make use of the new schema yet. That's on another branch that I'm not checking in yet because then you might get the idea that bits of it actually work and infect the rest of the matrix with unstable code and bring other sites down that have never even heard of hubzilla. Please do not use this code. Let me repeat, please do not use this code. One more time in case you didn't understand - please do not use this code. 2015-05-17 22:43:36 -07:00
redmatrix
25b599a4bd convert ITEM_WALL from bitfield to standalone 2015-05-06 21:03:33 -07:00
friendica
0bb89778d3 add channel_lastpost timestamp to help optimise some outrageously expensive queries. 2015-03-26 19:55:52 -07:00
friendica
6537a65053 mysql schema typo, do the install check for store before chcking smarty, as that is where the dir is created, change install doc to point to install/schema_xxxxx.sql instead of database.sql 2015-03-15 15:36:01 -07:00
friendica
9d1df58759 sql optimisation for affinity searches. A new index was added which wasn't added retro-actively to existing DBs as an update. It isn't clear if this helps sites any more than just restricting the abook table to certain channel_id's is (and this field is already indexed). 2015-03-10 18:55:56 -07:00
friendica
011ccd57f6 add queue priority 2015-03-04 17:56:07 -08:00
friendica
08f054130f require access token to view, query, or join directories in private realms, if the realm is so configured. 2015-02-24 16:36:27 -08:00
friendica
da2349bb6a provide relief to sites that are severely impacted by the slow ITEM_UNSEEN searches. This does not incorporate any other flag optimisations as that will require a major DB update and possibly involve significant downtime. This is just to bite off a little chunk now and provide some much needed relief. 2015-02-12 17:45:25 -08:00
friendica
b1a92d620e two tracks proceeding in parallel - first adding the ability to store a digital signature with ratings so that directories can pass them around, second provide some directory registration functions so we can obtain a list of directories from somewhere (to pass ratings around between them). This gives the primary directory role some value as that is where you register your directory. 2015-02-01 15:10:52 -08:00
friendica
0596097f86 provide storage for directory based reputation in the xlink table by setting xlink_static = 1, so that xlink_static = 0 is traditional poco linkages 2015-01-26 19:13:06 -08:00
zottel
eb4e6ab073 add db update 1131/1132 to database schemas 2015-01-23 23:20:30 +01:00
friendica
e3041b80fd oauth permissions table 2015-01-19 20:06:12 -08:00
Habeas Codice
ac27db22c1 Merge remote-tracking branch 'upstream/master'
Conflicts:
	boot.php
	include/dba/dba_driver.php
	include/diaspora.php
	include/follow.php
	include/session.php
	include/zot.php
	mod/photos.php
	mod/ping.php
2014-11-13 13:06:31 -08:00
Habeas Codice
1a5a5c7edb PostgreSQL support initial commit
There were 11 main types of changes:
- UPDATE's and DELETE's sometimes had LIMIT 1 at the end of them. This is not only non-compliant but
it would certainly not do what whoever wrote it thought it would. It is likely this mistake was just
copied from Friendica. All of these instances, the LIMIT 1 was simply removed.
- Bitwise operations (and even some non-zero int checks) erroneously rely on MySQL implicit
integer-boolean conversion in the WHERE clauses. This is non-compliant (and bad programming practice
to boot). Proper explicit boolean conversions were added. New queries should use proper conventions.
- MySQL has a different operator for bitwise XOR than postgres. Rather than add yet another dba_
func, I converted them to "& ~" ("AND NOT") when turning off, and "|" ("OR") when turning on. There
were no true toggles (XOR). New queries should refrain from using XOR when not necessary.
- There are several fields which the schema has marked as NOT NULL, but the inserts don't specify
them. The reason this works is because mysql totally ignores the constraint and adds an empty text
default automatically. Again, non-compliant, obviously. In these cases a default of empty text was
added.
- Several statements rely on a non-standard MySQL feature
(http://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html). These queries can all be rewritten
to be standards compliant. Interestingly enough, the newly rewritten standards compliant queries run
a zillion times faster, even on MySQL.
- A couple of function/operator name translations were needed (RAND/RANDOM, GROUP_CONCAT/STRING_AGG,
UTC_NOW, REGEXP/~, ^/#) -- assist functions added in the dba_
- INTERVALs: postgres requires quotes around the value, mysql requires that there are not quotes
around the value -- assist functions added in the dba_
- NULL_DATE's -- Postgres does not allow the invalid date '0000-00-00 00:00:00' (there is no such
thing as year 0 or month 0 or day 0). We use '0001-01-01 00:00:00' for postgres. Conversions are
handled in Zot/item packets automagically by quoting all dates with dbescdate().
- char(##) specifications in the schema creates fields with blank spaces that aren't trimmed in the
code. MySQL apparently treats char(##) as varchar(##), again, non-compliant. Since postgres works
better with text fields anyway, this ball of bugs was simply side-stepped by using 'text' datatype
for all text fields in the postgres schema. varchar was used in a couple of places where it actually
seemed appropriate (size constraint), but without rigorously vetting that all of the PHP code
actually validates data, new bugs might come out from under the rug.
- postgres doesn't store nul bytes and a few other non-printables in text fields, even when quoted.
bytea fields were used when storing binary data (photo.data, attach.data). A new dbescbin() function
was added to handle this transparently.
- postgres does not support LIMIT #,# syntax. All databases support LIMIT # OFFSET # syntax.
Statements were updated to be standard.

These changes require corresponding changes in the coding standards. Please review those before
adding any code going forward.

Still on my TODO list:
- remove quotes from non-reserved identifiers and make reserved identifiers use dba func for quoting
- Rewrite search queries for better results (both MySQL and Postgres)
2014-11-13 12:21:58 -08:00
Renamed from install/database.sql (Browse further)