I'm running through a D7 migration from 6.24 and the most up to date version of the D6 Notifications and I'm finding that the migration does not install the notifications_subscription table. There is no such table on the D6 version and navigating to the D7 "Subscriptions" menu link turns up the following error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'icateens_d7.notifications_subscription' doesn't exist: SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {notifications_subscription} s) subquery; Array ( ) in PagerDefault->execute() (line 74 of /Users/sean/dev/icateens_d7/includes/pager.inc).

I see the note at the bottom of notifications.install that says:

Update from 6.x to 7.x:  Rename table: notifications to notifications_subscription

I don't know if this means I should manually change the table name or if the migration path should do that for me. I'm the kind of guy who always touches the wall when I see a wet paint sign, so I tried renaming the table and still no dice.

Any advice?

Comments

seaneffel’s picture

Priority: Normal » Critical

Just confirmed that a clean install of Notifications creates the correct table {notifications_subscription}. I bumped up the issue priority just because the migration path seems to be an obstacle to users making the move from D6 to D7.

drewish’s picture

Yeah also seeing this.

edvanleeuwen’s picture

Subscribing, having the same problem.

edvanleeuwen’s picture

Workaround I have used in conjunction with OG Notifications:

  • Rename notifications to notifications_d7
  • Rename notifications_fields to notifications_fields_d7
  • Create a table 'tmp' with fields sid, uid, value, intval (all INT, sid as primary key autoincrement)
  • INSERT INTO tmp  (`uid`, `value`, intval)
    SELECT distinct `uid`, `value`, intval  FROM `notifications_d7`, `notifications_fields_d7`
    where `notifications_d7`.sid = `notifications_fields_d7`.sid
    and field = 'group'
    order by uid, value
  • Deactivate, deinstall and install notifications modules
  • INSERT INTO `notifications_subscription_fields` (`sid`, `type`, `position`, `value`, `intval`)
    SELECT `sid`, 'node:gid', '0', value, intval FROM tmp
    
  • INSERT INTO `notifications_subscription` (`sid`,`uid`, `mdid`, `type`, `event_type`, `conditions`, `send_interval`, `language`, `send_method`, `cron`, `module`, `status`, `destination`, `created`, `updated`)
    SELECT `sid`, `uid`, '0', 'group_content', '', '1', '0', 'nl', 'phpmailer', '1', 'notifications', '1', '', '1336154602', '1336154602'
    FROM `tmp
    
  • Drop table tmp
  • If subscriptions are available: drop _d7 tables
Stephen Ollman’s picture

Issue summary: View changes

Subscribing... Still an issue when upgrading from D6 to D7.

Renaming table does not help and errors:

Column not found: 1054 Unknown column 's.created' in 'order clause': SELECT s.sid AS sid FROM {notifications_subscription} s ORDER BY s.created DESC LIMIT 50 OFFSET 0; Array ( ) in PagerDefault->execute()

iaminawe’s picture

The instruction in #4 worked for me to resolve this on groups upgraded from D6 to D7. Thanks Ed.

mattschinkel’s picture

reinstall worked for me, but I had to disable modules via drush

mmomin’s picture

#4 worked for me.

I changed it a bit though as per my requirement.

1. Rename notifications to notifications_d7

2. Rename notifications_fields to notifications_fields_d7

3. Deactivate, deinstall and install notifications modules

4. INSERT INTO `notifications_subscription_fields` (`sid`, `type`, `position`, `value`, `intval`)
SELECT `sid`, `field`, '0', value, intval FROM `notifications_fields_d7`

5. INSERT INTO `notifications_subscription` (`sid`,`uid`, `mdid`, `type`, `event_type`, `conditions`, `send_interval`, `language`, `send_method`, `cron`, `module`, `status`, `destination`, `created`, `updated`)
SELECT `sid`, `uid`, '0', `type`, `event_type`, `conditions`, `send_interval`, 'nl', `send_method`, `cron`, `notofications`, `status`, `destination`, '1336154602', '1336154602'
FROM `notifications_d7`

6. If subscriptions are available: drop _d7 tables

Thank you so much

DamienMcKenna’s picture

Title: notifications_subscriptions table does not install on D7 migration » D6-D7 upgrade broken
Version: 7.x-1.0-alpha2 » 7.x-1.x-dev

Clarifying the title.