Skip to content
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

Descriptions in database are labels, not descriptions #24

Open
d4rky-pl opened this issue Jun 26, 2011 · 3 comments
Open

Descriptions in database are labels, not descriptions #24

d4rky-pl opened this issue Jun 26, 2011 · 3 comments

Comments

@d4rky-pl
Copy link
Contributor

Right now when new migrations arrive, they are inserted into database while doing db:migrate. The problem is that description in DB is taken from migration's filename so it's only the labelized version of it (100 chars at max, only A-Z characters).

Proposal:

  • renaming 'description' to 'label' in database
  • creating additional 'description' field with full description

It would be best to implement it by creating a new static public variable called $description in each Migration file.

@d4rky-pl
Copy link
Contributor Author

If this one passes, minion_schema should use utf8 rather than latin1 (right now it doesn't matter anyway because no non-ASCII data is being kept in database)

@samwilson
Copy link
Contributor

👍

What is the point of the label in the DB? Identification? It seems to me that this is what the timestamp is for, and the Migration class itself can (as you suggest) provide a proper description. But maybe I'm missing something.

@samwilson
Copy link
Contributor

On a related note: if the description is going to be normalised, it should use URL::title() and not this:

    // Max 100 characters, lowercase filenames.
    $label = substr(strtolower($description), 0, 100);

    // Only letters
    $label = preg_replace('~[^a-z]+~', '-', $label);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants