Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mariadb Out of range value for column #62

Open
wi1w opened this issue Feb 8, 2020 · 4 comments
Open

Mariadb Out of range value for column #62

wi1w opened this issue Feb 8, 2020 · 4 comments

Comments

@wi1w
Copy link

wi1w commented Feb 8, 2020

Hi.
I'll try use shmig in docker compose with mariadb 10.3

Migrate success but I get error when tool try write migrate table

ERROR 1264 (22003) at line 4: Out of range value for column 'version' at row 1
wi1w added a commit to wi1w/shmig that referenced this issue Feb 8, 2020
@wi1w wi1w mentioned this issue Feb 8, 2020
@mbucc
Copy link
Owner

mbucc commented Feb 9, 2020

Thanks for the bug report!

Can you send me the insert statement triggering the range error?

It should be the current epoch seconds, which currently is 1581270578.

A MySQL signed int should hold up to 2147483647, which gives me 17 years to fix this bug. :) (https://dev.mysql.com/doc/refman/8.0/en/numeric-type-syntax.html)

@mbucc
Copy link
Owner

mbucc commented Feb 9, 2020

Or just post your docker compose file.

@wi1w
Copy link
Author

wi1w commented Feb 10, 2020

MYSQL_DATABASE=test
MYSQL_USER=test
MYSQL_PASSWORD=1234234234hgfgh
MYSQL_ROOT_PASSWORD=gfdghfghfghgh
version: '3'

services:
  migrate:
    image: mkbucc/shmig:latest
    restart: on-failure
    command: up
    volumes:
      - ./migrations:/sql
    depends_on:
      - mariadb
    networks:
      - backend
    environment:
      DATABASE: ${MYSQL_DATABASE}
      LOGIN: ${MYSQL_USER}
      PASSWORD: ${MYSQL_PASSWORD}
      PORT: 3306
      HOST: mariadb
      TYPE: mysql
    labels:
      - "traefik.enable=false"
    logging:
      driver: "json-file"
      options:
        max-size: "50m"
        max-file: "3"

  mariadb:
    image: mariadb:10.3
    command: bash -c "chown -R mysql:mysql /var/log/mysql && exec /docker-entrypoint.sh mysqld --log-error=/var/log/mysql/err.log --slow_query_log=1 --slow_query_log_file=/var/log/mysql/slow.log --long_query_time=0.1 --general-log=1 --general-log-file=/var/log/mysql/general-log.log --character-set-server=utf8 --collation-server=utf8_general_ci"
    restart: 'always'
    volumes:
      - ./mariadb:/var/lib/mysql
      - ./logs/mysql:/var/log/mysql
    environment:
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
      MYSQL_DATABASE: ${MYSQL_DATABASE}
      MYSQL_USER: ${MYSQL_USER}
      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
    networks:
      - backend
    labels:
      - 'traefik.enable=false'
    logging:
      driver: "json-file"
      options:
        max-size: "50m"
        max-file: "3"

networks:
  frontend:
    external: true
  backend:
    internal: true

@mbucc
Copy link
Owner

mbucc commented Feb 11, 2020

Thank you. I'll take a closer look this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants