Skip to main content

Posts

Stopping and Starting Postgres SQL Database Server

Go to the Postgres installation bin directory, which would be something likeC:\Program Files\PostgreSQL\9.5\binIn the windows explorer path, type "cmd" and press Enter to launch Command Prompt window.Command to Stop the Postgres Database Serverpg_ctl -D "..\data" stopCommand to Start the Postgres Database Serverpg_ctl -D "..\data" start Command to Restart the Postgres Database Serverpg_ctl -D "..\data" restart
Recent posts

Creating Migration Query in Postgres

During development of an application, its a good practice to have multiple database instances - one for production and one for development/testing. The development/testing database would be the one you will be using for testing.

But what would you do if there is a change required in the database schema itself - like adding a column or changing the data type of a column or deleting a column? Duplicating the changes in multiple instances of the database is error prone and not efficient usage of time. That's where migration query comes in!
Steps to Create Migration Query 1. Open pgAdmin and connect to your database.
2. Right click on the specific table you would like to change and click on Properties.

3. Make necessary changes to the table - Eg: Like adding a new column.

4. Go to SQL tab. This would have generated an equivalent query for the change(s) you have made. Copy the query paste in a Notepad.

5. Do step 4 for all the changes you would like to make in the database. For each c…

Quick Links for Android Kotlin

This post has a collection of useful links related to development of Android applications using Kotlin. Getting Started with KotlinGetting Started with Android and KotlinKotlin Reference ManualPDF Version  Useful How TosAdding Internet Permission for your Android Application Leveraging Power of Functions in Kotlin API Request in Android using Kotlin  Useful Extensions (Kotlin + Java)AnkoAnko Commons: a lightweight library full of helpers for intents, dialogs, logging and so on;Anko Layouts: a fast and type-safe way to write dynamic Android layouts;Anko SQLite: a query DSL and parser collection for Android SQLite;Anko Coroutines: utilities based on the kotlinx.coroutines library.Parsing JSON Using org.json (built-in) - ExampleGSON - ExampleJacksonJSON Path (Similar to XPath for XML)  Web ScrapingJSoup - ExamplePicasso -  A powerful image downloading and caching library for Android Reusable Packages Open Source Kotlin Reusable Packages Free Online Courses for Learning KotlinDeveloping…