Opened 11 years ago

Closed 11 years ago

#334 closed new feature (fixed)

Download words table

Reported by: matrixpoint Owned by: matrixpoint
Priority: minor Milestone: 0.1.3
Component: BW Admin Keywords: words
Cc: jeanyves.hegron@…

Description

Page to download words table in compressed gzip format for import into localhost MySQL database.

Will avoid the need to manually update words on localhost.

Change History (13)

comment:1 Changed 11 years ago by matrixpoint

  • follow_up changed from none to test

Uploaded to test in r3760. (slight modification in r3760).

This isn't on a menu yet. The menu and other admin fundtions seem to still be in old BW, but I put this page into the BWROX Admin app: admin/wordsdownload, so you can test it here:

http://test.bewelcome.org/admin/wordsdownload

J-Y: perhaps you can find the right way to put it onto the volunteer menu. For now, the rights to use this downloader are the same as the "Words" rights. I leave it to you to change that.

It's extremely simple: it just downloads a file named "words.sql.gzip", which you should download to your desktop and not open directly, since it's compressed. Once downloaded, it should be unzipped (I use 7-zip) and then imported to MySQL. It's too big to import via phpMyAdmin, so I used the linux command "mysql -u root bewelcome < words.sql" in the C:
mysql\bin directory using cygwin linux emulator for Windows. There may be other ways to do it.

It does have one option to use REPLACE instead of INSERT, in case you don't want to empty your existing WORDS table first and start fresh.

comment:2 Changed 11 years ago by matrixpoint

Added function to upload an unzipped words.sql file to the localhost DB after it has been downloaded from test or alpha and decompressed. It ends up on a white page with the message "Import Complete". I think this is adequate for now, since only developers will use it.

This function will only appear on a localhost.

comment:3 Changed 11 years ago by matrixpoint

Latest r3764.

comment:4 Changed 11 years ago by matrixpoint

I should mention that this uploader should work for any sql file, not only for the words table, of any size. phpMyAdmin has an inconvenient size limit. However, there's no error reporting.

comment:5 Changed 11 years ago by matrixpoint

  • follow_up changed from test to move to alpha
  • Milestone changed from unassigned to 0.1.3 - more improvements & bugfixing

comment:6 Changed 11 years ago by matrixpoint

  • follow_up changed from move to alpha to test on alpha

Moved to alpha in r3874.

comment:7 Changed 11 years ago by matrixpoint

Download tests OK.

I had some trouble uploading the words table into my localhost DB, but the problem wasn't due to the new uploader. I ended up having to split the SQL file into about five pieces and uploading them separately.

comment:8 Changed 11 years ago by philipp

what's the right needed to display this - can't access the page

comment:9 Changed 11 years ago by matrixpoint

It's the "Words" right.

comment:10 Changed 11 years ago by matrixpoint

But it would be very easy, and probably make more sense to change it to something else, for all developers, like "Debug" without a scope, since every developer should be able to use this, I think. I only chose "Words" because it was the only right I had.

comment:11 Changed 11 years ago by philipp

Yes, Debug is the one to choose. Not sure if we need different scopes for all the Debug options. Are there really debug tools that are off limit for some of the developers?

comment:12 Changed 11 years ago by matrixpoint

Well, we now have "Debug", "DB_QUERY" for viewing the SQL queries on a page. I leave this to others to decide. For now, I will change the right to "Debug" on alpha in r3901.

comment:13 Changed 11 years ago by matrixpoint

  • follow_up changed from test on alpha to none
  • Resolution set to fixed
  • Status changed from new to closed

Sent to production in r3919 and r3920, but not ready for use on production until new words module is released.

Note: See TracTickets for help on using tickets.