--
-- Copyright (c) 2022 SUSE LLC
--
-- This software is licensed to you under the GNU General Public License,
-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-- along with this software; if not, see
-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
--

COMMENT ON TABLE SystemNetAddressV6
  IS 'The list of IPv6 address associated to a system';

COMMENT ON COLUMN SystemNetAddressV6.mgm_id
  IS 'The id of the BRAND_NAME instance that contains this data';
COMMENT ON COLUMN SystemNetAddressV6.system_id
  IS 'The id of the system';
COMMENT ON COLUMN SystemNetAddressV6.interface_id
  IS 'The id of the network interface';
COMMENT ON COLUMN SystemNetAddressV6.scope
  IS 'The scope of this IPv6 address';
COMMENT ON COLUMN SystemNetAddressV6.address
  IS 'The IPv6 address of the system';
COMMENT ON COLUMN SystemNetAddressV6.netmask
  IS 'The netmask associated to this address';
COMMENT ON COLUMN SystemNetAddressV6.synced_date
  IS 'The timestamp of when this data was last refreshed.';

ALTER TABLE SystemNetAddressV6
    ADD CONSTRAINT SystemNetAddressV6_interface_fkey FOREIGN KEY (mgm_id, system_id, interface_id) REFERENCES SystemNetInterface(mgm_id, system_id, interface_id);
