mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-12 08:38:14 +08:00
30 lines
753 B
Ruby
30 lines
753 B
Ruby
# frozen_string_literal: true
|
|
|
|
# This file is auto-generated from the IntermediateDB schema. To make changes,
|
|
# update the "config/intermediate_db.yml" configuration file and then run
|
|
# `bin/cli schema generate` to regenerate this file.
|
|
|
|
module Migrations::Database::IntermediateDB
|
|
module UserFieldOption
|
|
SQL = <<~SQL
|
|
INSERT INTO user_field_options (
|
|
user_field_id,
|
|
value,
|
|
created_at
|
|
)
|
|
VALUES (
|
|
?, ?, ?
|
|
)
|
|
SQL
|
|
private_constant :SQL
|
|
|
|
def self.create(user_field_id:, value:, created_at: nil)
|
|
::Migrations::Database::IntermediateDB.insert(
|
|
SQL,
|
|
user_field_id,
|
|
value,
|
|
::Migrations::Database.format_datetime(created_at),
|
|
)
|
|
end
|
|
end
|
|
end
|