Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7BEF0200B51 for ; Mon, 1 Aug 2016 12:32:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7A6C4160A65; Mon, 1 Aug 2016 10:32:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C0A87160A5D for ; Mon, 1 Aug 2016 12:32:11 +0200 (CEST) Received: (qmail 82597 invoked by uid 500); 1 Aug 2016 10:32:11 -0000 Mailing-List: contact issues-help@fineract.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@fineract.incubator.apache.org Delivered-To: mailing list issues@fineract.incubator.apache.org Received: (qmail 82587 invoked by uid 99); 1 Aug 2016 10:32:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2016 10:32:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 935E21A02C6 for ; Mon, 1 Aug 2016 10:32:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -5.446 X-Spam-Level: X-Spam-Status: No, score=-5.446 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id gIMmJnuVSTLM for ; Mon, 1 Aug 2016 10:32:08 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id CD99F5F248 for ; Mon, 1 Aug 2016 10:32:07 +0000 (UTC) Received: (qmail 82269 invoked by uid 99); 1 Aug 2016 10:32:06 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2016 10:32:06 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A94D5E058E; Mon, 1 Aug 2016 10:32:06 +0000 (UTC) From: nazeer1100126 To: issues@fineract.incubator.apache.org Reply-To: issues@fineract.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-fineract pull request #189: address_module Content-Type: text/plain Message-Id: <20160801103206.A94D5E058E@git1-us-west.apache.org> Date: Mon, 1 Aug 2016 10:32:06 +0000 (UTC) archived-at: Mon, 01 Aug 2016 10:32:12 -0000 Github user nazeer1100126 commented on a diff in the pull request: https://github.com/apache/incubator-fineract/pull/189#discussion_r72955848 --- Diff: fineract-provider/src/main/resources/sql/migrations/core_db/v312_address_module_tables_metadat.sql --- @@ -0,0 +1,127 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, +-- software distributed under the License is distributed on an +-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +-- KIND, either express or implied. See the License for the +-- specific language governing permissions and limitations +-- under the License. +-- + +--code inserts +INSERT INTO `m_code` (`id`, `code_name`, `is_system_defined`) VALUES (150, 'INDIAN STATES', 0); +INSERT INTO `m_code` (`id`, `code_name`, `is_system_defined`) VALUES (151, 'COUNTRY ID', 0); +INSERT INTO `m_code` (`id`, `code_name`, `is_system_defined`) VALUES (152, 'ADDRESS TYPE ID', 0); + +--add new column in portfolio +alter table `m_portfolio_command_source` add column `status` TINYINT(4) NULL DEFAULT NULL; + +--configuration +INSERT INTO `c_configuration` (`id`, `name`, `value`, `date_value`, `enabled`, `is_trap_door`, `description`) VALUES (29, 'Enable-Address', NULL, NULL, 1, 0, NULL); + +--add address table +CREATE TABLE `m_address` ( + `id` BIGINT(20) NOT NULL AUTO_INCREMENT, + `street` VARCHAR(100) NULL DEFAULT NULL, + `address_line_1` VARCHAR(100) NULL DEFAULT NULL, + `address_line_2` VARCHAR(100) NULL DEFAULT NULL, + `address_line_3` VARCHAR(100) NULL DEFAULT NULL, + `town_village` VARCHAR(100) NULL DEFAULT NULL, + `city` VARCHAR(100) NULL DEFAULT NULL, + `county_district` VARCHAR(100) NULL DEFAULT NULL, + `state_province_id` INT(11) NULL DEFAULT NULL, + `country_id` INT(11) NULL DEFAULT NULL, + `postal_code` VARCHAR(10) NULL DEFAULT NULL, + `latitude` DECIMAL(10,8) UNSIGNED NULL DEFAULT '0.00000000', + `longitude` DECIMAL(10,8) UNSIGNED NULL DEFAULT '0.00000000', + `created_by` VARCHAR(100) NULL DEFAULT NULL, + `created_on` DATE NULL DEFAULT NULL, + `updated_by` VARCHAR(100) NULL DEFAULT NULL, + `updated_on` DATE NULL DEFAULT NULL, + PRIMARY KEY (`id`), + INDEX `address_fields_codefk1` (`state_province_id`), + INDEX `address_fields_codefk2` (`country_id`), + CONSTRAINT `address_fields_codefk1` FOREIGN KEY (`state_province_id`) REFERENCES `m_code_value` (`id`), + CONSTRAINT `address_fields_codefk2` FOREIGN KEY (`country_id`) REFERENCES `m_code_value` (`id`) +) +COLLATE='utf8_general_ci' +ENGINE=InnoDB +AUTO_INCREMENT=20 +; + + +--entity address table +CREATE TABLE `m_client_address` ( + `id` BIGINT(20) NOT NULL AUTO_INCREMENT, + `client_id` BIGINT(20) NOT NULL DEFAULT '0', + `address_id` BIGINT(20) NOT NULL DEFAULT '0', + `address_type_id` INT(11) NOT NULL DEFAULT '0', + `is_active` TINYINT(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + INDEX `addressIdFk` (`address_id`), + INDEX `address_codefk` (`address_type_id`), + INDEX `clientaddressfk` (`client_id`), + CONSTRAINT `address_codefk` FOREIGN KEY (`address_type_id`) REFERENCES `m_code_value` (`id`), + CONSTRAINT `clientaddressfk` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +) +COLLATE='utf8_general_ci' +ENGINE=InnoDB +AUTO_INCREMENT=28 --- End diff -- why AUTO_INCREMENT=28 ? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---