Commit graph

146 commits

Author SHA1 Message Date
zotlabs
43e55eb9a6 Active channels information is a bit imprecise. Provide a higher accuracy method. This will require a transition period 2018-04-16 21:40:43 -07:00
zotlabs
4915a4efbb OAuth2 integration 2018-04-03 21:08:40 -07:00
zotlabs
a454aad124 federated polls: GNU-Social requires us to preserve the original order of the poll answers for use in making a vote, unlike diaspora (which selects by guid) and activitypub (which selects by non-localisable text). 2018-03-07 15:39:14 -08:00
zotlabs
f0f58dade8 federated polls: add poll_author which will be necessary for Diaspora federation 2018-03-06 15:31:45 -08:00
zotlabs
277da43631 provide DB compatibility for poll and voting implementations across several platforms 2018-02-22 20:52:39 -08:00
zotlabs
9d51318c53 table structure for pseudo or proxy channels (pchan) 2017-10-19 17:24:11 -07:00
Mario Vavti
d5ffa5508d db update to add index to item.resource_id we query this in wikis a lot 2017-09-16 10:11:59 +02:00
Mario Vavti
e935473c5c add combined index for item.uid and item.item_unseen. this speeds up notifications by a magnitude. 2017-09-01 21:27:59 +02:00
git-marijus
79a806f328 db update to add index for item.obj_type 2017-07-31 16:49:56 +02:00
Mario Vavti
f5735fb67b missing abook_{my,their}_perms in pg schema and missing keys in mysql schema 2017-07-05 10:36:32 +02:00
Mario Vavti
a34d8773f1 add the cdav pgsql schemas 2017-07-04 10:28:16 +02:00
zotlabs
df3eb562f0 danger - do not use 'char(n)' with postgres it creates a thing called a bpchar which is different than a normal text field in subtle ways. 2017-05-15 22:58:13 -07:00
zotlabs
8c38841a4d Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2017-05-07 14:43:38 -07:00
zotlabs
f840082aae Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2017-05-05 16:58:46 -07:00
Klaus Weidenbach
f162508ad1 👷🐛 Import table structure in TravisCI.
Fix a syntax error in schema_postres.sql which was discovered while
working on this.
2017-05-06 01:07:15 +02: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
d3feb93619 typo 2017-04-19 10:25:57 +02:00
zotlabs
a3b1eec548 backend infrastructure for 'channel protection password'; which will be used to optionally encrypt export files and resolve channel/identity ownership/hijacking disputes 2017-04-19 09:59:50 +02:00
zotlabs
9d425b4727 typo 2017-04-12 18:48:30 -07:00
zotlabs
07d62bc111 typo 2017-04-12 18:48:06 -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
24ddc8e026 issue #523 2016-09-22 17:00:32 -07:00
redmatrix
7121d8e427 issue #511, postgres schema issues 2016-09-09 21:25:57 -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
6bf2e8a108 some perms fixes to stuff that was already written before I move on 2016-07-04 16:30:03 -07:00
Habeas Codice
f40f7b4d6e typos 2016-06-27 16:06:09 -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
Peter Hormanns
7edc505c2f fix typo in postgres schema 2016-03-01 17:54:52 +01: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
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
391807b46c small fixes, removed old unused database row, and log more prominently a missing directory server URL 2015-11-12 16:45:38 -08:00
Waitman Gobble
f94a8698dd updates to Postgres schema 2015-11-11 07:42:41 -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
a7135b5ecd fix the postgres schema with all the changes to date 2015-06-29 19:58:44 -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
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
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
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
Daniel Frank
32e4d4633a fix issues in schema_postgres.sql
- change PRIMARY_KEY to PRIMARY KEY
- replace smallint(1) with smallint
2015-02-26 23:50:46 +01: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
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