Add copyright notice
This commit is contained in:
parent
f3172bb38f
commit
b7cabc1661
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
module ApplicationCable
|
module ApplicationCable
|
||||||
class Channel < ActionCable::Channel::Base
|
class Channel < ActionCable::Channel::Base
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
module ApplicationCable
|
module ApplicationCable
|
||||||
class Connection < ActionCable::Connection::Base
|
class Connection < ActionCable::Connection::Base
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
after_action :set_csrf_cookie
|
after_action :set_csrf_cookie
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class ExpensesController < ApplicationController
|
class ExpensesController < ApplicationController
|
||||||
before_action :set_expense, only: %i[ show edit update destroy ]
|
before_action :set_expense, only: %i[ show edit update destroy ]
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class GroupsController < ApplicationController
|
class GroupsController < ApplicationController
|
||||||
def index
|
def index
|
||||||
roots = Group.where(parent_id: nil)
|
roots = Group.where(parent_id: nil)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
require 'csv'
|
require 'csv'
|
||||||
|
|
||||||
class GuestsController < ApplicationController
|
class GuestsController < ApplicationController
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class TablesArrangementsController < ApplicationController
|
class TablesArrangementsController < ApplicationController
|
||||||
def index
|
def index
|
||||||
@tables_arrangements = TablesArrangement.all.order(discomfort: :asc).limit(10)
|
@tables_arrangements = TablesArrangement.all.order(discomfort: :asc).limit(10)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
module TreeNodeExtension
|
module TreeNodeExtension
|
||||||
def distance_to_common_ancestor(another_node)
|
def distance_to_common_ancestor(another_node)
|
||||||
return 0 if self == another_node
|
return 0 if self == another_node
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
module ExpensesHelper
|
module ExpensesHelper
|
||||||
end
|
end
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
module GroupsHelper
|
module GroupsHelper
|
||||||
end
|
end
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
module GuestsHelper
|
module GuestsHelper
|
||||||
end
|
end
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
module TablesArrangementsHelper
|
module TablesArrangementsHelper
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class ApplicationJob < ActiveJob::Base
|
class ApplicationJob < ActiveJob::Base
|
||||||
# Automatically retry jobs that encountered a deadlock
|
# Automatically retry jobs that encountered a deadlock
|
||||||
# retry_on ActiveRecord::Deadlocked
|
# retry_on ActiveRecord::Deadlocked
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class ApplicationMailer < ActionMailer::Base
|
class ApplicationMailer < ActionMailer::Base
|
||||||
default from: "from@example.com"
|
default from: "from@example.com"
|
||||||
layout "mailer"
|
layout "mailer"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class ApplicationRecord < ActiveRecord::Base
|
class ApplicationRecord < ActiveRecord::Base
|
||||||
primary_abstract_class
|
primary_abstract_class
|
||||||
end
|
end
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class Expense < ApplicationRecord
|
class Expense < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class Group < ApplicationRecord
|
class Group < ApplicationRecord
|
||||||
validates :name, uniqueness: true
|
validates :name, uniqueness: true
|
||||||
validates :name, :order, presence: true
|
validates :name, :order, presence: true
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class Guest < ApplicationRecord
|
class Guest < ApplicationRecord
|
||||||
acts_as_taggable_on :affinity_groups, :unbreakable_bonds
|
acts_as_taggable_on :affinity_groups, :unbreakable_bonds
|
||||||
belongs_to :group
|
belongs_to :group
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class Seat < ApplicationRecord
|
class Seat < ApplicationRecord
|
||||||
belongs_to :guest
|
belongs_to :guest
|
||||||
belongs_to :table_arrangement
|
belongs_to :table_arrangement
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class TablesArrangement < ApplicationRecord
|
class TablesArrangement < ApplicationRecord
|
||||||
has_many :seats
|
has_many :seats
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class SerializableGroup < JSONAPI::Serializable::Resource
|
class SerializableGroup < JSONAPI::Serializable::Resource
|
||||||
type 'group'
|
type 'group'
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class SerializableGuest < JSONAPI::Serializable::Resource
|
class SerializableGuest < JSONAPI::Serializable::Resource
|
||||||
type 'guest'
|
type 'guest'
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class AffinityGroupsHierarchy < Array
|
class AffinityGroupsHierarchy < Array
|
||||||
include Singleton
|
include Singleton
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
module Tables
|
module Tables
|
||||||
class DiscomfortCalculator
|
class DiscomfortCalculator
|
||||||
private attr_reader :table
|
private attr_reader :table
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
require_relative '../../extensions/tree_node_extension'
|
require_relative '../../extensions/tree_node_extension'
|
||||||
|
|
||||||
module Tables
|
module Tables
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
module Tables
|
module Tables
|
||||||
class Swap
|
class Swap
|
||||||
private attr_reader :initial_solution
|
private attr_reader :initial_solution
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
module Tables
|
module Tables
|
||||||
class Table < Array
|
class Table < Array
|
||||||
attr_accessor :discomfort
|
attr_accessor :discomfort
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
module VNS
|
module VNS
|
||||||
class Engine
|
class Engine
|
||||||
def target_function(&function)
|
def target_function(&function)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<div id="<%= dom_id expense %>">
|
<div id="<%= dom_id expense %>">
|
||||||
<p>
|
<p>
|
||||||
<strong>Name:</strong>
|
<strong>Name:</strong>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<%= form_with(model: expense) do |form| %>
|
<%= form_with(model: expense) do |form| %>
|
||||||
<% if expense.errors.any? %>
|
<% if expense.errors.any? %>
|
||||||
<div style="color: red">
|
<div style="color: red">
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<h1>Editing expense</h1>
|
<h1>Editing expense</h1>
|
||||||
|
|
||||||
<%= render "form", expense: @expense %>
|
<%= render "form", expense: @expense %>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<p style="color: green"><%= notice %></p>
|
<p style="color: green"><%= notice %></p>
|
||||||
|
|
||||||
<h1>Expenses</h1>
|
<h1>Expenses</h1>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<h1>New expense</h1>
|
<h1>New expense</h1>
|
||||||
|
|
||||||
<%= render "form", expense: @expense %>
|
<%= render "form", expense: @expense %>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<p style="color: green"><%= notice %></p>
|
<p style="color: green"><%= notice %></p>
|
||||||
|
|
||||||
<%= render @expense %>
|
<%= render @expense %>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<%= form_with(model: guest) do |form| %>
|
<%= form_with(model: guest) do |form| %>
|
||||||
<% if guest.errors.any? %>
|
<% if guest.errors.any? %>
|
||||||
<div style="color: red">
|
<div style="color: red">
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<div id="<%= dom_id guest %>">
|
<div id="<%= dom_id guest %>">
|
||||||
<p>
|
<p>
|
||||||
<strong>First name:</strong>
|
<strong>First name:</strong>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<h1>Editing guest</h1>
|
<h1>Editing guest</h1>
|
||||||
|
|
||||||
<%= render "form", guest: @guest %>
|
<%= render "form", guest: @guest %>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<p style="color: green"><%= notice %></p>
|
<p style="color: green"><%= notice %></p>
|
||||||
|
|
||||||
<h1>Guests</h1>
|
<h1>Guests</h1>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<h1>New guest</h1>
|
<h1>New guest</h1>
|
||||||
|
|
||||||
<%= render "form", guest: @guest %>
|
<%= render "form", guest: @guest %>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<p style="color: green"><%= notice %></p>
|
<p style="color: green"><%= notice %></p>
|
||||||
|
|
||||||
<%= render @guest %>
|
<%= render @guest %>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -1 +1,3 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<h1>Tables arrangements</h1>
|
<h1>Tables arrangements</h1>
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<%# Copyright (C) 2024 Manuel Bustillo %>
|
||||||
|
|
||||||
<h1>ID: <%= @tables_arrangement.id %></h1>
|
<h1>ID: <%= @tables_arrangement.id %></h1>
|
||||||
|
|
||||||
<p>Discomfort: <%= @tables_arrangement.discomfort %></p>
|
<p>Discomfort: <%= @tables_arrangement.discomfort %></p>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
require_relative 'boot'
|
require_relative 'boot'
|
||||||
|
|
||||||
require 'rails'
|
require 'rails'
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
||||||
|
|
||||||
require "bundler/setup" # Set up gems listed in the Gemfile.
|
require "bundler/setup" # Set up gems listed in the Gemfile.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# Load the Rails application.
|
# Load the Rails application.
|
||||||
require_relative "application"
|
require_relative "application"
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
require "active_support/core_ext/integer/time"
|
require "active_support/core_ext/integer/time"
|
||||||
|
|
||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
require "active_support/core_ext/integer/time"
|
require "active_support/core_ext/integer/time"
|
||||||
|
|
||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
require "active_support/core_ext/integer/time"
|
require "active_support/core_ext/integer/time"
|
||||||
|
|
||||||
# The test environment is used exclusively to run your application's
|
# The test environment is used exclusively to run your application's
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# Pin npm packages by running ./bin/importmap
|
# Pin npm packages by running ./bin/importmap
|
||||||
|
|
||||||
pin "application"
|
pin "application"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
require_relative '../../app/services/affinity_groups_hierarchy'
|
require_relative '../../app/services/affinity_groups_hierarchy'
|
||||||
|
|
||||||
hierarchy = AffinityGroupsHierarchy.instance
|
hierarchy = AffinityGroupsHierarchy.instance
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Version of your assets, change this if you want to expire all your assets.
|
# Version of your assets, change this if you want to expire all your assets.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Define an application-wide content security policy.
|
# Define an application-wide content security policy.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# config/initializers/cors.rb
|
# config/initializers/cors.rb
|
||||||
|
|
||||||
Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
|
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Add new inflection rules using the following format. Inflections
|
# Add new inflection rules using the following format. Inflections
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Define an application-wide HTTP permissions policy. For further
|
# Define an application-wide HTTP permissions policy. For further
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class Numeric
|
class Numeric
|
||||||
def to_currency
|
def to_currency
|
||||||
Money.from_amount(self, "EUR").format
|
Money.from_amount(self, "EUR").format
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# This configuration file will be evaluated by Puma. The top-level methods that
|
# This configuration file will be evaluated by Puma. The top-level methods that
|
||||||
# are invoked here are part of Puma's configuration DSL. For more information
|
# are invoked here are part of Puma's configuration DSL. For more information
|
||||||
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
|
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
resources :groups, only: :index
|
resources :groups, only: :index
|
||||||
resources :guests do
|
resources :guests do
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class CreateExpenses < ActiveRecord::Migration[7.1]
|
class CreateExpenses < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
create_enum :pricing_types, ["fixed", "per_person"]
|
create_enum :pricing_types, ["fixed", "per_person"]
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class CreateGuests < ActiveRecord::Migration[7.1]
|
class CreateGuests < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
create_table :guests, id: :uuid do |t|
|
create_table :guests, id: :uuid do |t|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# This migration comes from acts_as_taggable_on_engine (originally 1)
|
# This migration comes from acts_as_taggable_on_engine (originally 1)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# This migration comes from acts_as_taggable_on_engine (originally 2)
|
# This migration comes from acts_as_taggable_on_engine (originally 2)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# This migration comes from acts_as_taggable_on_engine (originally 3)
|
# This migration comes from acts_as_taggable_on_engine (originally 3)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# This migration comes from acts_as_taggable_on_engine (originally 4)
|
# This migration comes from acts_as_taggable_on_engine (originally 4)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# This migration comes from acts_as_taggable_on_engine (originally 5)
|
# This migration comes from acts_as_taggable_on_engine (originally 5)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# This migration comes from acts_as_taggable_on_engine (originally 6)
|
# This migration comes from acts_as_taggable_on_engine (originally 6)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# This migration comes from acts_as_taggable_on_engine (originally 7)
|
# This migration comes from acts_as_taggable_on_engine (originally 7)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class CreateTablesArrangements < ActiveRecord::Migration[7.1]
|
class CreateTablesArrangements < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
create_table :tables_arrangements, id: :uuid do |t|
|
create_table :tables_arrangements, id: :uuid do |t|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class CreateSeats < ActiveRecord::Migration[7.1]
|
class CreateSeats < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
create_table :seats, id: :uuid do |t|
|
create_table :seats, id: :uuid do |t|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class CreateGroups < ActiveRecord::Migration[7.1]
|
class CreateGroups < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
create_table :groups, id: :uuid do |t|
|
create_table :groups, id: :uuid do |t|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class AddParentToGroup < ActiveRecord::Migration[7.1]
|
class AddParentToGroup < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
add_reference :groups, :parent, type: :uuid, index: true, foreign_key: { to_table: :groups }
|
add_reference :groups, :parent, type: :uuid, index: true, foreign_key: { to_table: :groups }
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class AddGroupToGuest < ActiveRecord::Migration[7.1]
|
class AddGroupToGuest < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
add_reference :guests, :group, null: false, foreign_key: true, type: :uuid
|
add_reference :guests, :group, null: false, foreign_key: true, type: :uuid
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
class AddStatusToGuest < ActiveRecord::Migration[7.1]
|
class AddStatusToGuest < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
add_column :guests, :status, :integer, default: 0
|
add_column :guests, :status, :integer, default: 0
|
||||||
|
2
db/schema.rb
generated
2
db/schema.rb
generated
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
# This file is auto-generated from the current state of the database. Instead
|
# This file is auto-generated from the current state of the database. Instead
|
||||||
# of editing this file, please use the migrations feature of Active Record to
|
# of editing this file, please use the migrations feature of Active Record to
|
||||||
# incrementally modify your database, and then regenerate this schema definition.
|
# incrementally modify your database, and then regenerate this schema definition.
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (C) 2024 Manuel Bustillo
|
||||||
|
|
||||||
NUMBER_OF_GUESTS = 50
|
NUMBER_OF_GUESTS = 50
|
||||||
|
|
||||||
TablesArrangement.delete_all
|
TablesArrangement.delete_all
|
||||||
|
Loading…
x
Reference in New Issue
Block a user