[Catalyst] "Unknown column 'me.role'" error
Dustin Suchter
dsuchter at ucla.edu
Fri Sep 7 20:22:03 GMT 2007
Unfortunately I thought of that one already, and the two do match.
Here's the useful YAML and below is the useful SQL just to double
check. I believe the underlying MySQL engine is 4.1.
# cat adblue.yml | grep -v "\s*#"
---
name: AdBlue
authentication:
dbic:
user_class: AdBlueDB::User
user_field: username
password_field: password
authorization:
dbic:
role_class: AdBlueDB::User
role_field: role
role_rel: map_user_role
user_role_user_field: user_id
#
[lines from my SQL file]:
249 --
250 -- Table structure for table `users`
251 --
252
253 CREATE TABLE `users` (
254 `id` int(32) unsigned NOT NULL
auto_increment COMMENT 'the unique ID of the users of the
AdBlue system',
255 `email` varchar(32) collate utf8_unicode_ci NOT
NULL COMMENT 'email address',
256 `username` varchar(32) collate utf8_unicode_ci NOT
NULL COMMENT 'client or admin username',
257 `password` varchar(32) collate utf8_unicode_ci
default 'passw0rd' COMMENT 'passwords',
258 `password_tmp` varchar(32) collate utf8_unicode_ci
default 'passw0rd' COMMENT 'a 1 time use temporary
password, used for initial signu
259 `password_dirty` tinyint(1) NOT NULL
default '0' COMMENT 'if passwords are "dirty" that
means the TMP password is
260 `creation_time` timestamp NOT NULL
default CURRENT_TIMESTAMP COMMENT 'the time this user was created',
261 `client_id` int(32) unsigned NOT NULL
default '0' COMMENT 'if this is an external client,
this is their ID number'
262 `deleted` tinyint(1) NOT NULL
default '0' COMMENT 'the status of this user - have
they been deleted?',
263 PRIMARY KEY (`id`),
264 FOREIGN KEY (`client_id`) REFERENCES clients(id)
265 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
COMMENT='this table stores username and role informaion, not contact
' AUTO_INCREMENT=0;
269 --
270 -- Table structure for table `roles`
271 --
272
273 CREATE TABLE `roles` (
274 `id` int(32) NOT NULL
auto_increment COMMENT 'this is the unique ID of this role',
275 `role` varchar(32) collate utf8_unicode_ci NOT
NULL COMMENT 'this is the name of the role',
276 PRIMARY KEY (`id`)
277 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
COMMENT='this table stores username informaion' AUTO_INCREMENT=0;
293 --
294 -- Table structure for table `user_roles`
295 --
296
297 CREATE TABLE `user_roles` (
298 `user_id` int(32) unsigned NOT NULL
COMMENT 'this is the user who has this role',
299 `role_id` int(32) NOT NULL
COMMENT 'this is the id of the role a user
has',
300 FOREIGN KEY (`user_id`) REFERENCES users(id),
301 FOREIGN KEY (`role_id`) REFERENCES roles(id)
302 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
COMMENT='this table stores the relationship of what users have roles';
Charlie Garrison wrote:
> Good evening,
>
> On 6/9/07 at 11:15 PM -0700, Dustin Suchter <dsuchter at ucla.edu> wrote:
>
>> The overall question is, what the heck is going on?!?
>
> What does your conf file look like (probably yaml file)? I'm guessing
> the user/roles setup doesn't match the database schema.
>
>> Thanks to anyone who even read this far!
>
> To be honest, I didn't read it all, I skipped ahead. So apologies if I
> missed something.
>
>
> Charlie
>
More information about the Catalyst
mailing list