mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 09:27:19 +02:00
parent
43cf1d483c
commit
a337604dc0
8 changed files with 16 additions and 137 deletions
|
@ -1,5 +1,4 @@
|
|||
class DomainTransfer < ActiveRecord::Base
|
||||
include Versions # version/domain_transfer_version.rb
|
||||
belongs_to :domain
|
||||
|
||||
belongs_to :transfer_from, class_name: 'Registrar'
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
class DomainTransferVersion < PaperTrail::Version
|
||||
include VersionSession
|
||||
self.table_name = :log_domain_transfers
|
||||
self.sequence_name = :log_domain_transfers_id_seq
|
||||
end
|
5
db/migrate/20180120182712_drop_log_domain_transfers.rb
Normal file
5
db/migrate/20180120182712_drop_log_domain_transfers.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class DropLogDomainTransfers < ActiveRecord::Migration
|
||||
def change
|
||||
drop_table :log_domain_transfers
|
||||
end
|
||||
end
|
|
@ -0,0 +1,6 @@
|
|||
class RemoveDomainTransfersPaperTrail < ActiveRecord::Migration
|
||||
def change
|
||||
remove_column :domain_transfers, :creator_str, :string
|
||||
remove_column :domain_transfers, :updator_str, :string
|
||||
end
|
||||
end
|
|
@ -962,9 +962,7 @@ CREATE TABLE domain_transfers (
|
|||
transfer_to_id integer,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
wait_until timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying
|
||||
wait_until timestamp without time zone
|
||||
);
|
||||
|
||||
|
||||
|
@ -1722,44 +1720,6 @@ CREATE SEQUENCE log_domain_statuses_id_seq
|
|||
ALTER SEQUENCE log_domain_statuses_id_seq OWNED BY log_domain_statuses.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_domain_transfers; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE TABLE log_domain_transfers (
|
||||
id integer NOT NULL,
|
||||
item_type character varying NOT NULL,
|
||||
item_id integer NOT NULL,
|
||||
event character varying NOT NULL,
|
||||
whodunnit character varying,
|
||||
object json,
|
||||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
uuid character varying
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_domain_transfers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE log_domain_transfers_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_domain_transfers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE log_domain_transfers_id_seq OWNED BY log_domain_transfers.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_domains; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -3029,13 +2989,6 @@ ALTER TABLE ONLY log_domain_contacts ALTER COLUMN id SET DEFAULT nextval('log_do
|
|||
ALTER TABLE ONLY log_domain_statuses ALTER COLUMN id SET DEFAULT nextval('log_domain_statuses_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY log_domain_transfers ALTER COLUMN id SET DEFAULT nextval('log_domain_transfers_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -3506,14 +3459,6 @@ ALTER TABLE ONLY log_domain_statuses
|
|||
ADD CONSTRAINT log_domain_statuses_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_domain_transfers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY log_domain_transfers
|
||||
ADD CONSTRAINT log_domain_transfers_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -4171,20 +4116,6 @@ CREATE INDEX index_log_domain_statuses_on_item_type_and_item_id ON log_domain_st
|
|||
CREATE INDEX index_log_domain_statuses_on_whodunnit ON log_domain_statuses USING btree (whodunnit);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_log_domain_transfers_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE INDEX index_log_domain_transfers_on_item_type_and_item_id ON log_domain_transfers USING btree (item_type, item_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_log_domain_transfers_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE INDEX index_log_domain_transfers_on_whodunnit ON log_domain_transfers USING btree (whodunnit);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_log_domains_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -5111,3 +5042,7 @@ INSERT INTO schema_migrations (version) VALUES ('20180120172649');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180120172657');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180120182712');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180120183441');
|
||||
|
||||
|
|
|
@ -249,17 +249,6 @@
|
|||
<ellipse fill="none" stroke="#b69a48" cx="3362.88" cy="-77.2265" rx="4.00001" ry="4.00001"/>
|
||||
<polygon fill="#b69a48" stroke="#b69a48" points="1658.02,-21.3879 1648.14,-16.6196 1653.02,-21.2529 1648.02,-21.1179 1648.02,-21.1179 1648.02,-21.1179 1653.02,-21.2529 1647.9,-25.6163 1658.02,-21.3879 1658.02,-21.3879"/>
|
||||
</g>
|
||||
<!-- DomainTransferVersion -->
|
||||
<g id="node25" class="node"><title>DomainTransferVersion</title>
|
||||
<ellipse fill="none" stroke="black" cx="1568.99" cy="-145" rx="96.6831" ry="18"/>
|
||||
<text text-anchor="middle" x="1568.99" y="-141.3" font-family="Times,serif" font-size="14.00">DomainTransferVersion</text>
|
||||
</g>
|
||||
<!-- DomainTransferVersion->VersionAssociation -->
|
||||
<g id="edge23" class="edge"><title>DomainTransferVersion->VersionAssociation</title>
|
||||
<path fill="none" stroke="#1ab0b8" d="M1568.99,-118.759C1568.99,-97.7907 1568.99,-68.0121 1568.99,-46.4538"/>
|
||||
<ellipse fill="none" stroke="#1ab0b8" cx="1568.99" cy="-122.881" rx="4" ry="4"/>
|
||||
<polygon fill="#1ab0b8" stroke="#1ab0b8" points="1568.99,-46.313 1573.49,-36.313 1568.99,-41.313 1568.99,-36.313 1568.99,-36.313 1568.99,-36.313 1568.99,-41.313 1564.49,-36.313 1568.99,-46.313 1568.99,-46.313"/>
|
||||
</g>
|
||||
<!-- BankTransactionVersion -->
|
||||
<g id="node26" class="node"><title>BankTransactionVersion</title>
|
||||
<ellipse fill="none" stroke="black" cx="590.994" cy="-145" rx="98.5829" ry="18"/>
|
||||
|
@ -1142,13 +1131,6 @@
|
|||
<polygon fill="#21f8a2" stroke="#21f8a2" points="795.532,-330.958 805.846,-327.236 799.124,-327.481 802.717,-324.003 802.717,-324.003 802.717,-324.003 799.124,-327.481 799.587,-320.77 795.532,-330.958 795.532,-330.958"/>
|
||||
<text text-anchor="middle" x="807.994" y="-357.3" font-family="Times,serif" font-size="14.00">versions</text>
|
||||
</g>
|
||||
<!-- DomainTransfer->DomainTransferVersion -->
|
||||
<g id="edge72" class="edge"><title>DomainTransfer->DomainTransferVersion</title>
|
||||
<path fill="none" stroke="#a8b212" d="M1537.76,-281.077C1544.55,-251.693 1555.8,-203.046 1562.79,-172.849"/>
|
||||
<ellipse fill="none" stroke="#a8b212" cx="1536.86" cy="-284.98" rx="4.00001" ry="4.00001"/>
|
||||
<polygon fill="#a8b212" stroke="#a8b212" points="1562.81,-172.743 1569.45,-164.014 1563.94,-167.871 1565.06,-163 1565.06,-163 1565.06,-163 1563.94,-167.871 1560.68,-161.986 1562.81,-172.743 1562.81,-172.743"/>
|
||||
<text text-anchor="middle" x="1570.99" y="-249.3" font-family="Times,serif" font-size="14.00">versions</text>
|
||||
</g>
|
||||
<!-- ContactStatus->ContactStatusVersion -->
|
||||
<g id="edge73" class="edge"><title>ContactStatus->ContactStatusVersion</title>
|
||||
<path fill="none" stroke="#32889b" d="M2845.18,-184.569C2839.41,-183.259 2833.59,-182.035 2827.99,-181 2762.84,-168.941 2745.31,-174.168 2679.99,-163 2589.61,-147.545 2486.25,-123.526 2421.79,-107.778"/>
|
||||
|
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 126 KiB |
|
@ -490,28 +490,6 @@
|
|||
<ellipse fill="none" stroke="#766dfb" cx="3438.54" cy="-76.1046" rx="4.00002" ry="4.00002"/>
|
||||
<polygon fill="#766dfb" stroke="#766dfb" points="1846.03,-21.437 1836.16,-16.6626 1841.03,-21.299 1836.03,-21.1609 1836.03,-21.1609 1836.03,-21.1609 1841.03,-21.299 1835.91,-25.6592 1846.03,-21.437 1846.03,-21.437"/>
|
||||
</g>
|
||||
<!-- DomainTransferVersion -->
|
||||
<g id="node25" class="node"><title>DomainTransferVersion</title>
|
||||
<path fill="none" stroke="black" d="M1694.5,-273.5C1694.5,-273.5 1819.5,-273.5 1819.5,-273.5 1825.5,-273.5 1831.5,-279.5 1831.5,-285.5 1831.5,-285.5 1831.5,-442.5 1831.5,-442.5 1831.5,-448.5 1825.5,-454.5 1819.5,-454.5 1819.5,-454.5 1694.5,-454.5 1694.5,-454.5 1688.5,-454.5 1682.5,-448.5 1682.5,-442.5 1682.5,-442.5 1682.5,-285.5 1682.5,-285.5 1682.5,-279.5 1688.5,-273.5 1694.5,-273.5"/>
|
||||
<text text-anchor="middle" x="1757" y="-439.3" font-family="Times,serif" font-size="14.00">DomainTransferVersion</text>
|
||||
<polyline fill="none" stroke="black" points="1682.5,-431.5 1831.5,-431.5 "/>
|
||||
<text text-anchor="start" x="1690.5" y="-416.3" font-family="Times,serif" font-size="14.00">id :integer</text>
|
||||
<text text-anchor="start" x="1690.5" y="-401.3" font-family="Times,serif" font-size="14.00">item_type :string</text>
|
||||
<text text-anchor="start" x="1690.5" y="-386.3" font-family="Times,serif" font-size="14.00">item_id :integer</text>
|
||||
<text text-anchor="start" x="1690.5" y="-371.3" font-family="Times,serif" font-size="14.00">event :string</text>
|
||||
<text text-anchor="start" x="1690.5" y="-356.3" font-family="Times,serif" font-size="14.00">whodunnit :string</text>
|
||||
<text text-anchor="start" x="1690.5" y="-341.3" font-family="Times,serif" font-size="14.00">object :json</text>
|
||||
<text text-anchor="start" x="1690.5" y="-326.3" font-family="Times,serif" font-size="14.00">object_changes :json</text>
|
||||
<text text-anchor="start" x="1690.5" y="-311.3" font-family="Times,serif" font-size="14.00">created_at :datetime</text>
|
||||
<text text-anchor="start" x="1690.5" y="-296.3" font-family="Times,serif" font-size="14.00">session :string</text>
|
||||
<text text-anchor="start" x="1690.5" y="-281.3" font-family="Times,serif" font-size="14.00">children :json</text>
|
||||
</g>
|
||||
<!-- DomainTransferVersion->VersionAssociation -->
|
||||
<g id="edge23" class="edge"><title>DomainTransferVersion->VersionAssociation</title>
|
||||
<path fill="none" stroke="#a3d90c" d="M1757,-264.875C1757,-190.385 1757,-93.0714 1757,-46.3577"/>
|
||||
<ellipse fill="none" stroke="#a3d90c" cx="1757" cy="-269.067" rx="4" ry="4"/>
|
||||
<polygon fill="#a3d90c" stroke="#a3d90c" points="1757,-46.1362 1761.5,-36.1362 1757,-41.1362 1757,-36.1362 1757,-36.1362 1757,-36.1362 1757,-41.1362 1752.5,-36.1363 1757,-46.1362 1757,-46.1362"/>
|
||||
</g>
|
||||
<!-- BankTransactionVersion -->
|
||||
<g id="node26" class="node"><title>BankTransactionVersion</title>
|
||||
<path fill="none" stroke="black" d="M614,-273.5C614,-273.5 742,-273.5 742,-273.5 748,-273.5 754,-279.5 754,-285.5 754,-285.5 754,-442.5 754,-442.5 754,-448.5 748,-454.5 742,-454.5 742,-454.5 614,-454.5 614,-454.5 608,-454.5 602,-448.5 602,-442.5 602,-442.5 602,-285.5 602,-285.5 602,-279.5 608,-273.5 614,-273.5"/>
|
||||
|
@ -1848,13 +1826,6 @@
|
|||
<polygon fill="#1a881f" stroke="#1a881f" points="919.662,-1372.29 924.748,-1362.58 919.959,-1367.3 920.256,-1362.31 920.256,-1362.31 920.256,-1362.31 919.959,-1367.3 915.764,-1362.04 919.662,-1372.29 919.662,-1372.29"/>
|
||||
<text text-anchor="middle" x="931" y="-1707.8" font-family="Times,serif" font-size="14.00">versions</text>
|
||||
</g>
|
||||
<!-- DomainTransfer->DomainTransferVersion -->
|
||||
<g id="edge72" class="edge"><title>DomainTransfer->DomainTransferVersion</title>
|
||||
<path fill="none" stroke="#97da6d" d="M1757,-1157.74C1757,-979.325 1757,-634.796 1757,-464.817"/>
|
||||
<ellipse fill="none" stroke="#97da6d" cx="1757" cy="-1161.74" rx="4" ry="4"/>
|
||||
<polygon fill="#97da6d" stroke="#97da6d" points="1757,-464.622 1761.5,-454.622 1757,-459.622 1757,-454.622 1757,-454.622 1757,-454.622 1757,-459.622 1752.5,-454.622 1757,-464.622 1757,-464.622"/>
|
||||
<text text-anchor="middle" x="1780" y="-820.3" font-family="Times,serif" font-size="14.00">versions</text>
|
||||
</g>
|
||||
<!-- ContactStatus->ContactStatusVersion -->
|
||||
<g id="edge73" class="edge"><title>ContactStatus->ContactStatusVersion</title>
|
||||
<path fill="none" stroke="#381ba0" d="M3180.66,-511.338C3170.31,-496.263 3157.51,-482.349 3142,-473 3094.87,-444.588 2946.14,-475.346 2895,-455 2794.71,-415.096 2705.7,-328.835 2646.82,-260.709"/>
|
||||
|
|
Before Width: | Height: | Size: 231 KiB After Width: | Height: | Size: 228 KiB |
|
@ -34,10 +34,6 @@ describe DomainTransfer do
|
|||
@domain_transfer.errors.full_messages.should match_array([
|
||||
])
|
||||
end
|
||||
|
||||
it 'should not have any versions' do
|
||||
@domain_transfer.versions.should == []
|
||||
end
|
||||
end
|
||||
|
||||
context 'with valid attributes' do
|
||||
|
@ -55,15 +51,5 @@ describe DomainTransfer do
|
|||
@domain_transfer.valid?
|
||||
@domain_transfer.errors.full_messages.should match_array([])
|
||||
end
|
||||
|
||||
it 'should have one version' do
|
||||
with_versioning do
|
||||
@domain_transfer.versions.should == []
|
||||
@domain_transfer.wait_until = 1.day.since
|
||||
@domain_transfer.save
|
||||
@domain_transfer.errors.full_messages.should match_array([])
|
||||
@domain_transfer.versions.size.should == 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue