Skip to content

Instantly share code, notes, and snippets.

@mironal
Created June 11, 2012 06:31
Show Gist options
  • Save mironal/2908740 to your computer and use it in GitHub Desktop.
Save mironal/2908740 to your computer and use it in GitHub Desktop.
mysql> show tables;
+--------------------------+
| Tables_in_db_hogehoge |
+--------------------------+
| contents |
| entrys |
| timestamps |
+--------------------------+
mysql> desc contents;
+----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| title | varchar(512) | NO | | NULL | |
| url | varchar(512) | NO | | NULL | |
| created | datetime | YES | | NULL | |
| modified | datetime | YES | | NULL | |
+----------+--------------+------+-----+---------+----------------+
mysql> desc entrys;
+--------------+----------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+----------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| rank | int(11) | NO | MUL | NULL | |
| timestamp_id | int(11) | NO | MUL | NULL | |
| content_id | int(11) | NO | | NULL | |
| cnt | int(11) | YES | | NULL | |
| created | datetime | YES | | NULL | |
| modified | datetime | YES | | NULL | |
+--------------+----------+------+-----+---------+----------------+
mysql> desc timestamps;
+----------+-------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| tweet | varchar(500) | YES | | NULL | |
| type | enum('hot','new') | NO | | hot | |
| created | datetime | YES | | NULL | |
| modified | datetime | YES | | NULL | |
+----------+-------------------+------+-----+---------+----------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment