Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Re : CURRENT_TIMESTAMP with mariadb

$
0
0
Hi,

I didn't even know there was a specific driver for mariadb. I was using the official mysql jdbc driver. I do not know if it make any difference.

I'm moving my scripts from mysql to mariadb and I wan't to retain what I have.

I'm using mariadb 10.0.12 and the default value for TIMESTAMP is CURRENT_TIMESTAMP by default
  1. [fsousa@imac ~]$ mysql
  2. Welcome to the MariaDB monitor.  Commands end with ; or \g.
  3. Your MariaDB connection id is 17
  4. Server version: 10.0.12-MariaDB Homebrew

  5. Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.

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

  7. MariaDB [(none)]> create database test;
  8. Query OK, 1 row affected (0.00 sec)

  9. MariaDB [(none)]> use test;
  10. Database changed
  11. MariaDB [test]> CREATE TABLE t (id INT, ts TIMESTAMP);
  12. Query OK, 0 rows affected (0.02 sec)

  13. MariaDB [test]> desc t
  14.     -> ;
  15. +-------+-----------+------+-----+-------------------+-----------------------------+
  16. | Field | Type      | Null | Key | Default           | Extra                       |
  17. +-------+-----------+------+-----+-------------------+-----------------------------+
  18. | id    | int(11)   | YES  |     | NULL              |                             |
  19. | ts    | timestamp | NO   |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
  20. +-------+-----------+------+-----+-------------------+-----------------------------+
  21. 2 rows in set (0.00 sec)

  22. MariaDB [test]>



Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>