Commit graph

229 commits

Author SHA1 Message Date
redmatrix
5b5f0666f9 second pass name change 2015-05-05 03:59:51 -07:00
redmatrix
a3c37f1458 first pass name change 2015-05-05 03:56:10 -07:00
Oliver Lorenz
c6400b30c9 Updated INSTALL.txt - outdated link corrected 2015-04-28 15:09:18 +02:00
friendica
d599ebe742 update resource links 2015-04-01 15:52:02 -07:00
friendica
0bb89778d3 add channel_lastpost timestamp to help optimise some outrageously expensive queries. 2015-03-26 19:55:52 -07:00
friendica
aa6549c239 we upped the php version requirement. So up yours. 2015-03-18 12:27:30 -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
dce0bb0ef8 finish converting "delete" to trash icons for consistency. The 'x' was left in a couple of places like the group list widget and saved search term widget and ignoring friend suggestions where it was more appropriate to leave it. 2015-02-26 16:41:38 -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
8eedc9d576 updated install doc 2015-02-20 13:18:44 -08:00
friendica
eeec826eda update the install doc for addons - the procedure is a bit different now (although it shouldn't break anything on existing sites.) 2015-02-19 20:53:24 -08:00
Habeas Codice
46964a8a88 make sql work on both db types 2015-02-13 02:57:28 -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
zottel
9dda248b94 make update 1133 work in PHP < 5.5 2015-02-10 09:49:26 +01:00
Habeas Codice
9ed23f9081 Merge branch 'master' of https://github.com/friendica/red 2015-02-05 09:15:39 -08:00
Habeas Codice
84843984b8 typo/cleanup pg only 2015-02-05 09:14:24 -08:00
friendica
e58bef049d admin/dbsync not reporting failed updates 2015-02-01 15:41:01 -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
Habeas Codice
3e5226adc7 Add more detail about directory_mode settings to default config and docs 2015-01-30 19:37:25 -08:00
Habeas Codice
2039710962 postgres does not support the , syntax. a ; would work, if it weren't statement-locked.
FWIW, the exact same queries listed for postgres are perfectly valid and equivalent on mysql. no need for separate
statements.
2015-01-28 17:47:31 -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
Habeas Codice
dc259ba027 typo 2015-01-25 04:13:14 -08:00
Habeas Codice
0ca71a6b5e update schema 2015-01-25 04:05:28 -08:00
Habeas Codice
200d973581 suppress notices that might be confusing 2015-01-25 04:04:53 -08:00
Habeas Codice
146efbc18e unmatched parens 2015-01-23 22:34:45 -08:00
zottel
eb4e6ab073 add db update 1131/1132 to database schemas 2015-01-23 23:20:30 +01:00
friendica
9028e6bd30 typo in postgres db update, remove redmatrix.nl from directory servers since it isn't a directory server any more. 2015-01-20 19:41:09 -08:00
friendica
e3041b80fd oauth permissions table 2015-01-19 20:06:12 -08:00
Habeas Codice
547d852ef7 fix update 1131 for postgres databases 2015-01-18 18:33:32 -08:00
friendica
1c9299ed42 more backend work on poco rating 2015-01-15 14:05:18 -08:00
Habeas Codice
28a0209ffd fix driver issue for large dbs
add rudimentary resume
2014-11-20 12:41:48 -08:00
Habeas Codice
9443ef8a3d simple command-line migrator from mysql to postgres
provided with the WorksForMe(tm) warranty of fitness for a purpose implied or otherwise
2014-11-17 12:26:24 -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
friendica
3b74e3c1e1 add defaults to database tables 2014-11-09 19:24:14 -08:00
friendica
d5d6158973 ok heads up - potentially destabilising change. I've tried to sort out all the default connection permissions for those who don't have a predefined (or therefore have a "custom") permissions role. Unfortunately this includes most people that were using this software more than a month ago. The real changes are that the SELF address book entry no longer holds "auto-permissions" but instead holds your "default permissions" (if you have a pre-defined role, the defaults will be pulled from the role table).
The auto permissions have moved to a pconfig (uid.system.autoperms). A DB update will move these settings into their new homes.

What used to be the "Auto-permissions settings" page is now the "default permissions settings" page and a checkbox therein decides whether or not to apply the permissions automatically. A link to this page will only be shown when you have the "custom" role selected.

With luck nobody will notice anything wrong. But at least for the next few days, please review permissions that have been assigned to new connections (either automatically or manually) and make sure they make sense (e.g. they aren't "nothing"). You still need to take action when seeing a message "permissions have changed but not yet submitted" as we always let you review and perhaps adjust the settings _before_ a connection is established (unless you have autoperms turned on).
2014-11-04 17:11:02 -08:00
Thomas Willingham
77fb1c2ee6 Doco - some clean up to install - keep politics out of it, 80 columnise it and
whitespace.
2014-10-22 20:22:37 +01:00
zottel
4fe8630518 document store writability requirements 2014-10-22 13:09:56 +02:00
friendica
5362943330 missing quote 2014-10-14 18:05:32 -07:00
friendica
2db7d88e28 this is the reason Diaspora forum tagging was broken 2014-10-14 18:02:34 -07:00
friendica
5236516145 install doc double escapes the store/[data] path. 2014-10-06 15:01:55 -07:00
jeroenpraat
0049f4c71a +png support
https://redmatrix.nl/channel/jeroenpraat/?f=&mid=83603d8f0876c040efafce87755fcd252dbe8da4a75d82fdb230519e3c8dcb72@redmatrix.nl
2014-10-05 21:05:50 +02:00
friendica
e8ef515b61 store diaspora meta info in the item table. It has to go there or it will kill us with complex joins. We can phase out the sign table once this all checks out. 2014-09-03 05:09:43 -07:00
Jeroen
3e8f9e8b62 update nl + Friendica>RedMatrix in two text files 2014-08-30 14:07:38 +00:00
friendica
53b5cf7f50 Ability to close comments at a certain date/time - needed for loom.io emulation (and many other uses) 2014-08-28 16:56:13 -07:00
friendica
eb27bea794 mind numbing drudgery continued... 2014-08-27 19:15:34 -07:00
friendica
e179dca446 place to store multiple choice and select items for extensible profiles 2014-08-26 22:37:04 -07:00