add mysql support

pull/105/head
Alex Turchyn 2 years ago
parent 22ea777c86
commit 70211b24c5

@ -31,7 +31,7 @@ ENV BUNDLE_WITHOUT="development:test"
WORKDIR /app
RUN apk add --no-cache build-base sqlite-dev libpq-dev vips-dev vips-poppler vips-heif libc6-compat ttf-freefont
RUN apk add --no-cache build-base sqlite-dev libpq-dev mariadb-dev vips-dev vips-poppler vips-heif libc6-compat ttf-freefont
COPY ./Gemfile ./Gemfile.lock ./

@ -15,6 +15,7 @@ gem 'google-cloud-storage'
gem 'hexapdf'
gem 'image_processing'
gem 'lograge'
gem 'mysql2'
gem 'oj'
gem 'pagy'
gem 'pg'

@ -286,6 +286,7 @@ GEM
msgpack (1.7.1)
multi_json (1.15.0)
multipart-post (2.3.0)
mysql2 (0.5.5)
net-http-persistent (4.0.2)
connection_pool (~> 2.2)
net-imap (0.3.6)
@ -507,6 +508,7 @@ DEPENDENCIES
image_processing
letter_opener_web
lograge
mysql2
oj
pagy
pg

@ -10,7 +10,8 @@ test:
<<: *default
database: docuseal_test
<% if ENV['DATABASE_URL'].to_s.empty? %>
production:
adapter: <%= ENV['DATABASE_URL'].present? ? 'postgresql' : 'sqlite3' %>
encoding: unicode
adapter: sqlite3
database: <%= ENV['WORKDIR'] || '.' %>/db.sqlite3
<% end %>

@ -5,9 +5,9 @@ class CreateTemplates < ActiveRecord::Migration[7.0]
create_table :templates do |t|
t.string :slug, null: false, index: { unique: true }
t.string :name, null: false
t.string :schema, null: false
t.string :fields, null: false
t.string :submitters, null: false
t.text :schema, null: false
t.text :fields, null: false
t.text :submitters, null: false
t.references :author, null: false, foreign_key: { to_table: :users }, index: true
t.references :account, null: false, foreign_key: true, index: true

@ -8,7 +8,7 @@ class CreateSubmitters < ActiveRecord::Migration[7.0]
t.string :uuid, null: false
t.string :email, null: false, index: true
t.string :slug, null: false, index: { unique: true }
t.string :values, null: false
t.text :values, null: false
t.string :ua
t.string :ip

Loading…
Cancel
Save