Hi,

Just need some advice please. On a new site should I install 7.x-2 until 7.x-3 is ready, and will then easily be able to upgrade?

I understand that the fields will be different, as long as the data is kept, ie flagged users, flagged friends and node bookmarks.

Looking forward to your response and thank you.

Comments

joachim’s picture

Status: Active » Fixed

You should install 2.0 on a production site. 3.x is not yet ready. There is already an upgrade path, as with (most) Drupal modules.

liliplanet’s picture

Status: Fixed » Closed (fixed)

Thank you Joachim!

ñull’s picture

Status: Closed (fixed) » Active

What is the present situation? I have this other issue #2042263: Allow direct unflag and apparently I need ver. 3.x for it. When I do:

drush up flag-7.x-3.0
Checking available update data ......                                                                                                                                          .

Code updates will be made to the following projects: Flag [flag-7.x-3.0]

Note: A backup of your project will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue with the update process? (y/n): y
Project flag was updated successfully. Installed version is now 7.x-3.0.
Backups were saved into the directory /var/www/drush-backups/mysite/20130719121743/modules/flag.                                                                             [ok]
WD menu: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.flag' doesn't exist: SELECT name, title FROM {flag}; Array                          [error]
(
)
 in flag_entity_info() (line 41 of /var/www/mysite/sites/all/modules/flag/flag.module).
WD php: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.flag' doesn't exist: SELECT f.fid AS fid, f.entity_type AS entity_type, f.name AS    [error]
name, f.title AS title, f.global AS global, f.options AS options, fn.type AS type
FROM 
{flag} f
LEFT OUTER JOIN {flag_types} fn ON fn.fid = f.fid; Array
(
)
 in flag_get_flags() (line 1733 of /var/www/mysite/sites/all/modules/flag/flag.module).
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.flag' doesn't exist: SELECT f.fid AS fid, f.entity_type AS entity_type, f.name AS name, f.title AS title, f.global AS global, f.options AS options, fn.type AS type
FROM 
{flag} f
LEFT OUTER JOIN {flag_types} fn ON fn.fid = f.fid; Array
(
)
 in flag_get_flags() (line 1733 of /var/www/mysite/sites/all/modules/flag/flag.module).
Drush command terminated abnormally due to an unrecoverable error.                                                                                                                 [error]
Backups were restored successfully.                                             

In other words I cannot upgrade. I will continue developing what I need, by uninstalling and starting from scratch, for the production site I will have to migrate / update all existing bookmark flags to 3.x

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

Can you try the upgrade process via the UI?

It's very important that nothing tries to clear caches before the upgrade process is complete -- maybe drush is doing that?

ñull’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Thanks for the support! That did it!

lotyrin’s picture

Is there any way to support upgrades with Drush? Our deployment is fully automated, we'll have to do this manually this time, but for any others in that boat.

lotyrin’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Issue summary: View changes
Status: Closed (fixed) » Active
joachim’s picture

We're far from being the first module that's changed its table names. Lots of core modules did this from 6-7. I've had a look at core module hook_update_n()s and I can't see what they're doing to prevent this kind of crash.

ivnish’s picture

Status: Active » Closed (outdated)

Closed as outdated because Drupal 7 is EOL