added mysql/load-data.sh

This commit is contained in:
agentzh (章亦春)
2010-01-20 18:34:27 +08:00
parent abfff86dbf
commit 56e75e09f2
3 changed files with 20 additions and 6 deletions

View File

@ -15,7 +15,7 @@ drop table if exists comments;
create table comments (
id serial,
sender varchar(64) not null,
email varchar(64) not null,
email varchar(64),
url varchar(1024),
body text not null,
created timestamp(0) default now() not null,

View File

@ -0,0 +1,12 @@
#!/bin/bash
mysql -h localhost -p -u monty test < misc/mysql/init-db.sql
../../util/import-model.pl --reset --user monty \
--password some_pass --server localhost \
--model posts Post.json
../../util/import-model.pl --reset --user monty \
--password some_pass --server localhost \
--model comments Comment.json