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

Reserved words #12

Open
beatep opened this issue Oct 13, 2016 · 2 comments
Open

Reserved words #12

beatep opened this issue Oct 13, 2016 · 2 comments

Comments

@beatep
Copy link

beatep commented Oct 13, 2016

Thanks for your extension, it is running fine, except one thing: you are using a few reserved words in your log-database, f.e. date, table and type, see here:

http://dev.mysql.com/doc/refman/5.7/en/keywords.html

As I was upgrading my table from ActiveRecordLog with yii1, I wanted to change the content of some fields via phpMyAdmin, there were some errors. After renaming them, it worked again.

@nhkey
Copy link
Owner

nhkey commented Dec 20, 2016

Thanks for your comment!

I agree with you, this reserved words is not good name for table's cols.
But if I change that now, I broke backward compatibility. In future major version I'll change it necessarily.

You can use quotes in your query, e.g.
UPDATE ActiveRecordLogTable SET `table`='blah-blah-blah' WHERE `date`>'2016-12-01';

@assafwint
Copy link

Thanks for this great extension, very simple and works great.
The only issue is that it does not support multiple PK's and so does not support M2M tables.
I have added two fields for secondary pk field name and value and the change is pretty simple to implement.

Simply edit class BaseManager function run($type, $object).
I am in the process of modifying it and when there's time I will post the complete function.
Any thoughts?

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

3 participants