Skip to content

Commit 48a486d

Browse files
committed
fixes to santa
1 parent 4deab56 commit 48a486d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mysql-santa/santa.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ def start_processing():
3333
proc_insert.start()
3434

3535

36+
3637
@sql.command()
37-
@click.option("--size", default=100000, help="Number of rows to create in total")
38+
@click.option("--size", default=1000000, help="Number of rows to create in total")
3839
@click.option("--nicelevel", default=0.9, help="Level of niceness in population(double: 0-1)")
3940
def setup_tables(size, nicelevel):
4041
sql_setup = [
@@ -44,7 +45,7 @@ def setup_tables(size, nicelevel):
4445
name varchar(64) not null,
4546
loc point srid 0 not null,
4647
age integer not null,
47-
niceflag enum('no', 'yes') not null,
48+
behavior enum('naughty', 'nice') not null,
4849
wish varchar(64) not null,
4950
index(niceflag, name),
5051
spatial index(loc)
@@ -70,7 +71,7 @@ def setup_tables(size, nicelevel):
7071
"xloc": random()*360-180,
7172
"yloc": random()*180-90,
7273
"age": randint(1, 100),
73-
"niceflag": "no" if random() > nicelevel else "yes",
74+
"behavior": "naughty" if random() > nicelevel else "nice",
7475
"wish": "".join([chr(randint(97, 97 + 26)) for x in range(64)]),
7576
}
7677

0 commit comments

Comments
 (0)