Including SQL files

Hello,

I installed Asterisk 1.6.1 and now I want to use full MySQL support. But nowhere in the docs or packages are proper SQL files to import in my database.

I have gathered pieces here and there, and they are all different, and 90% is outdated. Still I have Asterisk complaining about errors like:
[Nov 5 19:37:48] WARNING[3304]: res_config_mysql.c:1169 require_mysql: Table sipfriends requires a column ‘useragent’ of size ‘20’, but no such column exists.

Can you please include a full mysql / postgre SQL file that can be imported in the database to have a proper database setup?

Thanks in advance!