mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 16:53:37 +02:00
Added initial mail template editor #2369
This commit is contained in:
parent
5ba39fb406
commit
032cff3cf3
16 changed files with 298 additions and 1 deletions
19
db/migrate/20150825125118_create_email_templates.rb
Normal file
19
db/migrate/20150825125118_create_email_templates.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
class CreateEmailTemplates < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :mail_templates do |t|
|
||||
t.string :name, null: false
|
||||
t.string :subject
|
||||
t.string :from
|
||||
t.string :bcc
|
||||
t.string :cc
|
||||
t.text :body, null: false
|
||||
t.text :text_body, null: false
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :mail_templates
|
||||
end
|
||||
end
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150810114746) do
|
||||
ActiveRecord::Schema.define(version: 20150825125118) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -878,6 +878,18 @@ ActiveRecord::Schema.define(version: 20150810114746) do
|
|||
add_index "log_zonefile_settings", ["item_type", "item_id"], name: "index_log_zonefile_settings_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_zonefile_settings", ["whodunnit"], name: "index_log_zonefile_settings_on_whodunnit", using: :btree
|
||||
|
||||
create_table "mail_templates", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "subject"
|
||||
t.string "from"
|
||||
t.string "bcc"
|
||||
t.string "cc"
|
||||
t.text "body", null: false
|
||||
t.text "text_body", null: false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "messages", force: :cascade do |t|
|
||||
t.integer "registrar_id"
|
||||
t.string "body"
|
||||
|
|
|
@ -2228,6 +2228,43 @@ CREATE SEQUENCE log_zonefile_settings_id_seq
|
|||
ALTER SEQUENCE log_zonefile_settings_id_seq OWNED BY log_zonefile_settings.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: mail_templates; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE TABLE mail_templates (
|
||||
id integer NOT NULL,
|
||||
name character varying NOT NULL,
|
||||
subject character varying,
|
||||
"from" character varying,
|
||||
bcc character varying,
|
||||
cc character varying,
|
||||
body text NOT NULL,
|
||||
text_body text NOT NULL,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: mail_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE mail_templates_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: mail_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE mail_templates_id_seq OWNED BY mail_templates.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: messages; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -3154,6 +3191,13 @@ ALTER TABLE ONLY log_white_ips ALTER COLUMN id SET DEFAULT nextval('log_white_ip
|
|||
ALTER TABLE ONLY log_zonefile_settings ALTER COLUMN id SET DEFAULT nextval('log_zonefile_settings_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY mail_templates ALTER COLUMN id SET DEFAULT nextval('mail_templates_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -3676,6 +3720,14 @@ ALTER TABLE ONLY log_zonefile_settings
|
|||
ADD CONSTRAINT log_zonefile_settings_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: mail_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY mail_templates
|
||||
ADD CONSTRAINT mail_templates_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -4874,3 +4926,7 @@ INSERT INTO schema_migrations (version) VALUES ('20150803080914');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150810114746');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150810114747');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150825125118');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue