rename to templates

This commit is contained in:
Alex Turchyn
2023-05-31 23:19:20 +03:00
parent 98fc9d964a
commit 4a303cb423
59 changed files with 248 additions and 264 deletions
@@ -1,8 +1,8 @@
# frozen_string_literal: true
class CreateFlows < ActiveRecord::Migration[7.0]
class CreateTemplates < ActiveRecord::Migration[7.0]
def change
create_table :flows do |t|
create_table :templates do |t|
t.string :slug, null: false, index: { unique: true }
t.string :name, null: false
t.string :schema, null: false
@@ -5,7 +5,7 @@ class CreateSubmissions < ActiveRecord::Migration[7.0]
create_table :submissions do |t|
t.string :email, null: false, index: true
t.string :slug, null: false, index: { unique: true }
t.references :flow, null: false, foreign_key: true, index: true
t.references :template, null: false, foreign_key: true, index: true
t.string :values, null: false
t.string :ua
t.string :ip