103,124d102
< # We keep the bin names separate so that the data table doesn't get
< # huge since bin names are frequently repeated.
< #
< # COLUMNS:
< # 'id' is the unique bin identifer.
< # 'name' is the string name for the bin.
< #
< # INDEXES:
< # 'bin' is indexed to get the name of a bin when data is retrieved
< # via the data table.
< # 'name' is indexed to get the bin id for a named bin when you want
< # to search the data table based on a specific bin.
< #
< self.query('''
< CREATE TABLE bins(
< bn_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
< bn_name VARCHAR(255) NOT NULL,
< PRIMARY KEY(bn_id),
< UNIQUE (bn_name)
< ) TYPE=InnoDB''')
<
< #
225,226d202
< # 'bin' is the name of the bin that the data was generated in, if
< # any.
232c208
< # can be found in many runs, bins, and samples, in addition to
---
> # can be found in many runs and samples, in addition to
245d220
< dt_bin SMALLINT UNSIGNED NOT NULL,
249c224
< UNIQUE (dt_stat,dt_x,dt_y,dt_run,dt_tick,dt_bin)
---
> UNIQUE (dt_stat,dt_x,dt_y,dt_run,dt_tick)
401,406d375
< DELETE bins
< FROM bins
< LEFT JOIN data ON bn_id=dt_bin
< WHERE dt_bin IS NULL''')
<
< self.query('''