No activity today, make something!
cdent-rhat WipSchema

20140902155313 cdent  
plank:devstack(master) $ for i in sample meter resource; do mysqlshow -p -k ceilometer $i ;done
Enter password: 
Database: ceilometer  Table: sample
+-------------------+---------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
| Field             | Type          | Collation       | Null | Key | Default | Extra          | Privileges                      | Comment |
+-------------------+---------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
| id                | int(11)       |                 | NO   | PRI |         | auto_increment | select,insert,update,references |         |
| volume            | double        |                 | YES  |     |         |                | select,insert,update,references |         |
| message_signature | varchar(1000) | utf8_general_ci | YES  |     |         |                | select,insert,update,references |         |
| message_id        | varchar(1000) | utf8_general_ci | YES  |     |         |                | select,insert,update,references |         |
| timestamp         | decimal(20,6) |                 | YES  | MUL |         |                | select,insert,update,references |         |
| recorded_at       | decimal(20,6) |                 | YES  |     |         |                | select,insert,update,references |         |
| meter_id          | int(11)       |                 | YES  | MUL |         |                | select,insert,update,references |         |
| resource_id       | int(11)       |                 | YES  | MUL |         |                | select,insert,update,references |         |
+-------------------+---------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
+--------+------------+-----------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table  | Non_unique | Key_name                    | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+--------+------------+-----------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| sample | 0          | PRIMARY                     | 1            | id          | A         | 0           |          |        |      | BTREE      |         |               |
| sample | 1          | ix_sample_timestamp         | 1            | timestamp   | A         | 0           |          |        | YES  | BTREE      |         |               |
| sample | 1          | ix_sample_meter_id          | 1            | meter_id    | A         | 0           |          |        | YES  | BTREE      |         |               |
| sample | 1          | ix_sample_resource_id       | 1            | resource_id | A         | 0           |          |        | YES  | BTREE      |         |               |
| sample | 1          | ix_sample_meter_resource_id | 1            | meter_id    | A         | 0           |          |        | YES  | BTREE      |         |               |
| sample | 1          | ix_sample_meter_resource_id | 2            | resource_id | A         | 0           |          |        | YES  | BTREE      |         |               |
+--------+------------+-----------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
Enter password: 
Database: ceilometer  Table: meter
+-------+--------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
| Field | Type         | Collation       | Null | Key | Default | Extra          | Privileges                      | Comment |
+-------+--------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
| id    | int(11)      |                 | NO   | PRI |         | auto_increment | select,insert,update,references |         |
| name  | varchar(255) | utf8_general_ci | NO   | MUL |         |                | select,insert,update,references |         |
| type  | varchar(255) | utf8_general_ci | YES  |     |         |                | select,insert,update,references |         |
| unit  | varchar(255) | utf8_general_ci | YES  |     |         |                | select,insert,update,references |         |
+-------+--------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
+-------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name      | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| meter | 0          | PRIMARY       | 1            | id          | A         | 0           |          |        |      | BTREE      |         |               |
| meter | 0          | def_unique    | 1            | name        | A         | 0           |          |        |      | BTREE      |         |               |
| meter | 0          | def_unique    | 2            | type        | A         | 0           |          |        | YES  | BTREE      |         |               |
| meter | 0          | def_unique    | 3            | unit        | A         | 0           |          |        | YES  | BTREE      |         |               |
| meter | 1          | ix_meter_name | 1            | name        | A         | 0           |          |        |      | BTREE      |         |               |
+-------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
Enter password: 
Database: ceilometer  Table: resource
+-------------------+--------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
| Field             | Type         | Collation       | Null | Key | Default | Extra          | Privileges                      | Comment |
+-------------------+--------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
| internal_id       | int(11)      |                 | NO   | PRI |         | auto_increment | select,insert,update,references |         |
| resource_id       | varchar(255) | utf8_general_ci | YES  | MUL |         |                | select,insert,update,references |         |
| user_id           | varchar(255) | utf8_general_ci | YES  |     |         |                | select,insert,update,references |         |
| project_id        | varchar(255) | utf8_general_ci | YES  |     |         |                | select,insert,update,references |         |
| source_id         | varchar(255) | utf8_general_ci | YES  |     |         |                | select,insert,update,references |         |
| resource_metadata | text         | utf8_general_ci | YES  |     |         |                | select,insert,update,references |         |
| metadata_hash     | varchar(32)  | utf8_general_ci | YES  |     |         |                | select,insert,update,references |         |
+-------------------+--------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
+----------+------------+-------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table    | Non_unique | Key_name                | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+----------+------------+-------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| resource | 0          | PRIMARY                 | 1            | internal_id | A         | 0           |          |        |      | BTREE      |         |               |
| resource | 1          | ix_resource_resource_id | 1            | resource_id | A         | 0           |          |        | YES  | BTREE      |         |               |
+----------+------------+-------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+