In MySql I have a table with a field called is_top_winner and this is
defined as char(1). In Clojure I have this function:
(defn downgrade-everyone [db]
"2012-11-10 - Let's start by saying no one is a top expert. In a later
step we will upgrade those users who are top winners."
(sql/with-connection db
(sql/update-values
:sf_guard_user_profile
[true]
{:is_top_winner 'f' })))
When I run the app, I get this error:
Exception in thread "main" java.sql.BatchUpdateException: Data truncation:
Data too long for column 'is_top_winner' at row 1
Can anyone tell me what is the problem here?
You can see the table that I am working on here:
explain sf_guard_user_profile
-> ;
+---------------------------------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key |
Default | Extra |
+---------------------------------------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL
| auto_increment |
| user_id | int(11) | NO | MUL | NULL
| |
| status | varchar(255) | NO | |
| |
| first_name | varchar(255) | NO | |
| |
| last_name | varchar(255) | NO | |
| |
| email | varchar(255) | NO | |
| |
| url | varchar(255) | NO | |
| |
| biography | text | NO | | NULL
| |
| created_at | datetime | YES | | NULL
| |
| updated_at | datetime | YES | | NULL
| |
| cash_total | float | YES | | NULL
| |
| image | varchar(255) | NO | |
| |
| secret_signup_key | varchar(255) | NO | |
| |
| twitter_address | varchar(255) | NO | |
| |
| landing_page | varchar(255) | NO | |
| |
| subscription_paid | datetime | NO | | NULL
| |
| paypal_email_address | varchar(255) | NO | |
| |
| subscribe_to_questions_via_email | varchar(1) | NO | |
| |
| clients_can_contact | char(1) | NO | | NULL
| |
| country | varchar(255) | NO | | NULL
| |
| city | varchar(255) | NO | | NULL
| |
| payoneer_email | varchar(255) | NO | | NULL
| |
| paypal_email | varchar(255) | NO | | NULL
| |
| do_not_notify_regarding_community_pot | varchar(255) | NO | | NULL
| |
| subscribe_to_all_discourse | char(1) | NO | | NULL
| |
| is_allowed_to_vote | varchar(255) | NO | | NULL
| |
| is_top_winner | char(1) | NO | | NULL
| |
+---------------------------------------+--------------+------+-----+---------+----------------+
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en