Skip to content

Instantly share code, notes, and snippets.

@sebastian-palma
Created November 2, 2019 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebastian-palma/153d636526608d35ed7db14fc6e55484 to your computer and use it in GitHub Desktop.
Save sebastian-palma/153d636526608d35ed7db14fc6e55484 to your computer and use it in GitHub Desktop.
$ bundle exec rails db:migrate
== 20191101233132 ExtendExecutionDatetimePrecision: migrating =================
-- change_column(:executions, :order_insert_time, :datetime, {:limit=>6})
   -> 0.0912s
== 20191101233132 ExtendExecutionDatetimePrecision: migrated (0.0913s) ========

➜  stack git:(master) ✗ bin/rails db -p
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 34
Server version: 8.0.16 Homebrew

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> describe executions;
+-------------------+--------------+------+-----+---------+----------------+
| Field             | Type         | Null | Key | Default | Extra          |
+-------------------+--------------+------+-----+---------+----------------+
| id                | bigint(20)   | NO   | PRI | NULL    | auto_increment |
| name              | varchar(255) | YES  |     | NULL    |                |
| order_insert_time | datetime(6)  | YES  |     | NULL    |                |
| created_at        | datetime     | NO   |     | NULL    |                |
| updated_at        | datetime     | NO   |     | NULL    |                |
+-------------------+--------------+------+-----+---------+----------------+
5 rows in set (0.02 sec)

mysql> exit
Bye

$ bundle exec rails db:rollback
== 20191101233132 ExtendExecutionDatetimePrecision: reverting =================
-- change_column(:executions, :order_insert_time, :datetime, {:limit=>nil})
   -> 0.0848s
== 20191101233132 ExtendExecutionDatetimePrecision: reverted (0.0850s) ========

$ bin/rails db -p
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 36
Server version: 8.0.16 Homebrew

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> describe executions;
+-------------------+--------------+------+-----+---------+----------------+
| Field             | Type         | Null | Key | Default | Extra          |
+-------------------+--------------+------+-----+---------+----------------+
| id                | bigint(20)   | NO   | PRI | NULL    | auto_increment |
| name              | varchar(255) | YES  |     | NULL    |                |
| order_insert_time | datetime     | YES  |     | NULL    |                |
| created_at        | datetime     | NO   |     | NULL    |                |
| updated_at        | datetime     | NO   |     | NULL    |                |
+-------------------+--------------+------+-----+---------+----------------+
5 rows in set (0.01 sec)

mysql> exit
Bye

$ mysql --version
mysql  Ver 8.0.16 for osx10.14 on x86_64 (Homebrew)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment