Page MenuHomePhabricator

Database tables not created on Postgres: ERROR: relation "oathauth_users" does not exist
Closed, ResolvedPublic

Description

Author: rxtx206

Description:
I’m encountering a very interesting issue with the stable v1.22 OATHAuth extension. Please help! I am stuck! It appears that the required tables that should be in place to function are not present.

My specs are as follows:
• CentOS release 6.5 (Final), Kernel 2.6.32-431.17.1.el6.x86_64
• PHP 5.3.3
• Apache/2.2.15
• psql (PostgreSQL) 9.3.4
• Hypervisor Virtual Infrastructure Platform 6.22
• Snapshot: b541656

According to the documentation you do support Postgresql (which is fantastic btw.)

Steps to replicate:

  1. http://www.mediawiki.org/wiki/Extension:OATHAuth
  2. Select Download.
  3. Select Stable version 1.22
  4. Migrate downloaded tar.gz to wiki server.
  5. Move wikimedia-mediawiki-extensions-OATHAuth-b541656 to OATHAuth
  6. Change permissions to apache:apache, 755.
  7. run: php /maintenance/update.php
  8. Browse to Special Pages to verify working.
  9. Sadness ensues at database error.
  10. Spend next 2 days researching.

I have an image below and the actual text of the error at the bottom of the email. It appears that the tables are not being created.

Database details seem solid, however, not sure why it would not create. 

Are there custom steps to take? Do you have a README for your github stuff?

Full Err:

A database query error has occurred. This may indicate a bug in the software.
•	Query:
SELECT id,secret,secret_reset,scratch_tokens,scratch_tokens_reset,is_validated FROM "oathauth_users" WHERE id = '1' LIMIT 1
•	Function: OATHUser::newFromUser
•	Error: 42P01 ERROR: relation "oathauth_users" does not exist LINE 1: ...ch_tokens,scratch_tokens_reset,is_validated FROM "oathauth_... ^
Backtrace:
#0 /var/www/html/includes/db/DatabasePostgres.php(482): DatabaseBase->reportQueryError('ERROR: relatio...', '42P01', 'SELECT id,secr...', 'OATHUser::newFr...', false)
#1 /var/www/html/includes/db/Database.php(1039): DatabasePostgres->reportQueryError('ERROR: relatio...', '42P01', 'SELECT id,secr...', 'OATHUser::newFr...', false)
#2 /var/www/html/includes/db/Database.php(1496): DatabaseBase->query('SELECT id,secr...', 'OATHUser::newFr...')
#3 /var/www/html/includes/db/Database.php(1585): DatabaseBase->select('oathauth_users', Array, Array, 'OATHUser::newFr...', Array, Array)
#4 /var/www/html/extensions/OATHAuth/OATHUser.php(170): DatabaseBase->selectRow('oathauth_users', Array, Array, 'OATHUser::newFr...')
#5 /var/www/html/extensions/OATHAuth/special/SpecialOATH.php(17): OATHUser::newFromUser(Object(User))
#6 /var/www/html/includes/SpecialPageFactory.php(337): SpecialOATH->__construct()
#7 /var/www/html/includes/SpecialPageFactory.php(365): SpecialPageFactory::getPage('OATH')
#8 /var/www/html/includes/specials/SpecialSpecialpages.php(54): SpecialPageFactory::getUsablePages(Object(User))
#9 /var/www/html/includes/specials/SpecialSpecialpages.php(42): SpecialSpecialpages->getPageGroups()
#10 /var/www/html/includes/SpecialPage.php(631): SpecialSpecialpages->execute(NULL)
#11 /var/www/html/includes/SpecialPageFactory.php(488): SpecialPage->run(NULL)
#12 /var/www/html/includes/Wiki.php(298): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#13 /var/www/html/includes/Wiki.php(602): MediaWiki->performRequest()
#14 /var/www/html/includes/Wiki.php(467): MediaWiki->main()
#15 /var/www/html/index.php(49): MediaWiki->run()
#16 {main}

I look forward to your reply.


Version: REL1_22-branch
Severity: blocker
OS: Linux
Platform: PC

Details

Reference
bz65658

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz65658.

The reason for this is because this extension does not have support for anything other than MySQL.

Change 135618 had a related patch set uploaded by Parent5446:
Add non-MySQL database support

https://gerrit.wikimedia.org/r/135618

rxtx206 wrote:

Fantastic! Thank you!

Tyler's patch has one -1 in Gerrit because Jeff had issues with merging.

Rhiannon: Did you have a chance to test Tyler's patch?

Rhiannon: Did you have a chance to test Tyler's patch?

scfc added a subscriber: scfc.Nov 24 2014, 4:52 AM

Rhiannon: Did you have a chance to test Tyler's patch?

Aklapper removed RyanLane as the assignee of this task.Apr 26 2015, 12:11 PM

Change 135618 had a related patch set uploaded (by Reedy):
Add non-MySQL database support

https://gerrit.wikimedia.org/r/135618

Reedy updated the task description. (Show Details)Oct 31 2016, 2:32 PM
Reedy set Security to None.
Reedy lowered the priority of this task from Normal to Lowest.

Change 135618 merged by jenkins-bot:
Add non-MySQL database support

https://gerrit.wikimedia.org/r/135618

Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.

Reedy closed this task as Resolved.Nov 12 2016, 1:30 AM
Reedy claimed this task.