-
Notifications
You must be signed in to change notification settings - Fork 15
name can contain 255 instead of 50 chars, command is text instead of varchar(255) #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Name: Enough for what? The name is just there as a human readable identifier for the script in the monitor table. Parameters etc should not go here. What do you need 255 chars for? Command: If we change it we must change it for Oracle and Postgres too, so the patch is incomplete. I see your point, but if we go that big we risk hitting the max length of unix command lines. I found that the limit is at least 2048 on POSIX systems, it may be larger on some systems but there is no guarantee about that. We would need a mechanism to protect against overflow. |
|
Well, as the aim was to increase the size of the command, why not do the same with the name as, in term of sizes a varchar(50) is the same as varchar(255) for a string smaller than 50 (in mysql) But, I agree 50 should be enough for the name However for the command, 255 is really too short... Maybe it's possible to increase to 1024 instead of 255? it should be enough Of course, the solution would be to have no limitation at all (to avoid to know the minimum size of all OS supported by eZPublish) Any idea for a perfect solution with no limitation? |
|
Limit seems to be (at least) 2047 on Windows So no risk to increase the command(255) to command(2000) ? What do you think about it @glye ? |
|
Yes, I think 2000 should be pretty safe. As for a perfect solution with no limitation, I don't know. I think that will always depend on the command, don't see how that can be done by the extension. |
|
Ok, and for the name, you want to keep with the 50, or maybe increase a little ? In fact, for now, I'm filling this name with: "myExtension some summary" As a result, 50 is ok, but may be too short if using a big name for an extension with a clear summary (that may be long) You might object that 50 may force the developer to be concise in his description, which may be a good thing also :) But why not let the developer decide to be verbose or not for this name? |
|
I don't have strong opinions about the name length. My concern is that the monitor table should be easily readable: http://projects.ez.no/var/plain_site/storage/images/ezscriptmonitor/70039-1-eng-GB/ezscriptmonitor.png |
|
Ok, so new commit with command pushed to varchar(2000). Can you review this patch @glye please? The patch is complete now, as modifications have been done to all dbms BUT, it has been coded blindly for oracle, postgresql, I've no skill on the available types on those dbms... |
|
I have checked the varchar limits for Oracle (4000 bytes) and Postgres (1 GB), so they seem ok. I'm fine with the patch as it is now. As far as I'm concerned it can be merged. |
|
Will the increased name size potentially break gui's? |
|
Only if there are no spaces, then it extends the table so you have to scroll sideways. Otherwise the text wraps, and looks ok. |
|
André, are you ok with the varchar(255) for the name ? (Btw, just a reminder: I guess that whenever a change is performed to the ezscriptmonitor sql tables, an ALTER sql is needed into the update/database/(mysql|postgresql)/4.7/dbupdate-4.6.0-to-4.7.0.sql and in unstable also) |
|
Yes ( correct, will you add it? We should also remember oracle. ) |
|
Yes I'll add it (for mysql at least), maybe some help would be needed for postgresql and oracle :) |
|
Here we are: ezsystems/ezpublish-legacy#251 (postgresql is lacking, please André if you have some time/skills on it, consider add another commit to complete it) I've not considered oracle at all, as the latter is not listed in update/database (it would be nice of course to add it, and add specific script for each upgrade) have a nice we! |
|
Oh sorry, the change on database must be bundled in ezscriptmonitor so |
|
This doesn't seem to be set in stone. The only other example I found is in eZ OE: I'd say the path you used looks good: @andrerom please confirm. |
|
confirmed, over! |
In fact, I've run into problem with ezscriptmonitor:
Some remarks:
Feel free to comment ;)